登陆页面和登陆处理url都要写在exclude-mapping path,不然登陆处理也会被拦截器拦截:
<mvc:mapping path="/**"/>
<mvc:exclude-mapping path="/WEB-INF/jsps/login.jsp"/>
<mvc:exclude-mapping path="/user/dologin"/>
<bean class="com.my.interceptor.LoginInterceptor"></bean>
<mvc:mapping path="/**"/>
<mvc:exclude-mapping path="/WEB-INF/jsps/login.jsp"/>
<mvc:exclude-mapping path="/user/dologin"/>
<bean class="com.my.interceptor.LoginInterceptor"></bean>
2017-03-10