4

We have a requirement to log the complete request and response to our JSON based REST endpoints. We are going to use Spring Reactive. Is there a recommended solution that works out of the box? If not, what's the best approach to log request and response?

  • You can create a WebFilter similar to this one: https://stackoverflow.com/questions/45240005/how-to-log-request-and-response-bodies-in-spring-webflux/45877770#45877770 – Ilya Zinkovich Oct 23 '18 at 19:35
  • 1
    That's a good progress but I need to log the content of the response. In Spring MVC you can wrap the response before calling filter chain so that you can read the response multiple times. I don't know how to do something like this with WebFlux – Alireza Salimi Oct 25 '18 at 19:03

0 Answers0