How to get a message (un) for registration

I have a w Spring MVC REST service that uses an XStream to convert messages to and from XML.

Is it possible to somehow print xml (i.e. body) from a request and response to a regular log4j logger?

Inside the controller it will not work, in addition, XStream will redirect the request and has not yet canceled the response.

The filter in the servlet is not very pleasant, because it will consume the body while reading it.

And this is where the ideas end. So-so? Any takers? :)

+4
source share
1 answer

You can use the interceptor to register your request and response content coming to your special holiday uri - Read more here

+1
source

All Articles