How to use RequestBodyAdvice
<pre><code>@ControllerAdvice
public class RequestBodyAdviceChain implements RequestBodyAdvice {

    @Override
    public boolean supports(MethodParameter methodParameter, Type type,
            Class&lt; ? extends HttpMessageConverter&lt; ? &gt;&gt; aClass) {
        return true;
    }

    @Override
    public Object handleEmptyBody(Object o, HttpInputMessage httpInputMessage, MethodParameter methodParameter,
            Type type, Class&lt; ? extends HttpMessageConverter&lt; ? &gt;&gt; aClass) {
        return o;
    }

    @Override
    public HttpInputMessage beforeBodyRead(HttpInputMessage httpInputMessage, MethodParameter methodParameter,
            Type type, Class&lt; ? extends HttpMessageConverter&lt; ? &gt;&gt; aClass) throws IOException {
        return httpInputMessage;
    }

    @Override
    public Object afterBodyRead(Object o, HttpInputMessage httpInputMessage, MethodParameter methodParameter, Type type,
            Class&lt; ? extends HttpMessageConverter&lt; ? &gt;&gt; aClass) {
        return o;
    }
}
</code></pre>

<p>Ideally, flow should reach these function first and then go to controller but it's not working.</p>