I am using @Configuration in Spring 3.0.6 to use dependency injection without using .xml definition .xml .
I use a mixed approach for defining controllers, I put them in DispatcherServlet @Configuration using @Bean("/sample/path") and use @RequestMapping in my methods to further refine the mapping (including using it to add to the bean).
This works well with the default HandlerMapper configuration.
Now I want to add HandlerInterceptors to the mix. It seems I need to duplicate the default configuration of HandlerMapper and then add my HandlerInterceptor .
However, this does not seem like a great idea. Is there a way to add my HandlerInterceptor to the default configuration of HandlerMapper ?
source share