Logic I have to implement is logging all requests with body served to DB.
So I decided to use: afterCompletion
method of HandlerInterceptor
.
There are two parameters passed to this method HttpServletRequest
and HttpServletResponse
among the others.
Question is: how to get RequestBody
and ResponseBody
from supplied objects?
As far as I know at Controller we can use @RequestBody
and @ResponseBody
. Can I reuse them at HandlerInterceptor
?