Spring interceptor configuration

I am using Spring 3.0

I need to write an interceptor that intercepts all urls. in my application

I wrote one intercptor

public class HelloInterceptor extends HandlerInterceptorAdapter {

how can i configure it in spring -servlet.xml.

+3
source share
1 answer

Usage <mvc:interceptors>(see docs ) e.g.

Example of interceptor registration applied to all URLs:

<mvc:interceptors>
    <bean class="x.y.HelloInterceptor" />
</mvc:interceptors>
+2
source

All Articles