In a Spring-mvc interceptor I want to access to the handler controller method
public class CustomInterceptor implements HandlerInterceptor { public bool
You can cast the Object handler to HandlerMethod.
Object handler
HandlerMethod
HandlerMethod method = (HandlerMethod) handler;
Note however that the handler argument passed to preHandle is not always a HandlerMethod (careful with ClassCastException). HandlerMethod then has methods you can use to get annotations, etc.
handler
preHandle
ClassCastException