Using a custom annotation on a Spring MVC controller method from an interceptor.
Posted
by
Speck
on Stack Overflow
See other posts from Stack Overflow
or by Speck
Published on 2011-06-23T23:00:51Z
Indexed on
2011/06/24
0:22 UTC
Read the original article
Hit count: 179
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.
© Stack Overflow or respective owner