Using a custom annotation on a Spring MVC controller method from an interceptor.
- by Speck
I have a custom annotation with which I've annotated a method in my Controller alongside a @ReqestMapping.
The goal is to use the values set in the custom annotation from a HandlerInterceptor to perform a task.
I have the interceptor (HandlerInterceptorAdaptor) mapped and it executes. If I set a breakpoint in my concrete Interceptor I can inspect the HttpServletRequest, HttpServletResponse, and handler Objects. However, I cannot see how to 1, obtain the method which the request is trying to access 2, obtain the Annotations on that method and 3, of course, obtain the values set by the annotation.
Can anyone point me to good documentation for this?
Please and Thank You.