需要再dispatcher servlet的配置文件写exclude path,否则会进入死循环。
例如,/hello是登录界面,就需要排除/hello
<mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/**" />
<mvc:exclude-mapping path="/hello" />
<bean class="com.llz.controller.TestInterceptor"></bean>
</mvc:interceptor>
例如,/hello是登录界面,就需要排除/hello
<mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/**" />
<mvc:exclude-mapping path="/hello" />
<bean class="com.llz.controller.TestInterceptor"></bean>
</mvc:interceptor>
2016-11-24