如何使用SpringMVC拦截器
public class MyInteceptor implements HandlerInterceptor { 略。。。 }
<mvc:interceptors> <bean class="com.app.mvc.MyInteceptor" /> </mvc:interceptors>
<mvc:interceptors > <mvc:interceptor> <mvc:mapping path="/user/*" /> <!-- /user/* --> <bean class="com.mvc.MyInteceptor"></bean> </mvc:interceptor> </mvc:interceptors>
<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"> <property name="interceptors"> <list> <bean class="com.mvc.MyInteceptor"></bean> </list> </property> </bean>
如何使用SpringMVC拦截器,布布扣,bubuko.com
原文:http://blog.csdn.net/hao947_hao947/article/details/28608209