3

I have a spring boot application, and I can easily write an interceptor something like RequestBodyAdviceAdapter that will allow me to intercept the incoming request. The problem with this approach is that it seems to intercept things right before the @Controller class... Is there something that will intercept a request very early on? Like before LDAP Authentication. I have a pointcut that is intercepting some things before my RequestBodyAdviceAdapter, but havent found any other ways to intercept things before my RequestBodyAdviceAdapter. Thus my question is, is there something that exist, or explains what happens before the @Controller and how I could possibly intercept it like right as soon as the request actually enters into my service long before the @Controller?

Thanks,

2
  • If you to intercept before the RequestBodyAdviceAdapter,so what's the utility of the interceptor provided by spring boot? or you can make some AOP implementation Commented Oct 28, 2020 at 16:14
  • Not sure I understand you comment could you clarify?
    – Brian
    Commented Oct 28, 2020 at 16:36

1 Answer 1

0

This can be accomplished by using filters. Specifically in this instance a OncePerRequestFilter can be used.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.