Reputation: 2007
i want to know is there a way to get the HttpServletRequest
body before any Jackson
involvement in spring. I tried it with @JsonDeserializer
and spring HandlerInterceptorAdapter
and also with a HttpRequestWrapper
but no luck for now. if anyone knows please suggest me a way to do this thanks.
Upvotes: 0
Views: 717
Reputation: 30839
You can add a custom Filter
in the application (explained here) and override doFilter
method. E.g.:
public void doFilter(
ServletRequest request,
ServletResponse response,
FilterChain chain){
....
}
This would give you the request
object from which, you can get the payload.
Upvotes: 2