spring完成拦截器
1.创建一个类,实现接口Handlerterceptor
<mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/user/**"/>
<mvc:exclude-mapping path="/user/login"/>
<mvc:exclude-mapping path="/user/registe"/>
<mvc:exclude-mapping path="/user/index"/>
<bean class="com.zhiyou100.sh.interceptor.MyInterceptor"></bean>
</mvc:interceptor>
</mvc:interceptors>