Using Spring MVC, do interceptors only intercept defined controller mappings or can they also be used to intercept general requests made within the servlet context?
Using Spring MVC, do interceptors only intercept defined controller mappings or can they also
Share
Spring MVC interceptors intercept only request to controllers. For intercepting other requests use
Filters.UPDATE: If you want to configure filters as Spring beans, you can use
DelegatingFilterProxy, as follows:(or
<bean id = "myFilter" class = "...MyFilter">...</bean>in XML config).Then, in
web.xml: