<!-- 配置用于session验证的拦截器 -->
<!--
如果有多个拦截器满足拦截处理的要求,则依据配置的先后顺序来执行
-->
<mvc:interceptors>
<mvc:interceptor>
<!-- 拦截所有的请求,这个必须写在前面,也就是写在【不拦截】的上面 -->
<mvc:mapping path="/**/**" />
<!-- 但是排除下面这些,也就是不拦截请求 -->
<mvc:exclude-mapping path="/vercoder/**" />
<mvc:exclude-mapping path="/bus/vercoder/**" />
<bean class="com.an.interceptor.LoginHandlerInterceptor" />
</mvc:interceptor>
</mvc:interceptors>
....
<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
<property name="filterChainDefinitions">
<value>
/static/login/** = anon
/vercoder/** = anon
/bus/vercoder/** = anon
</value>
</property>
</bean>
SpringMVC不拦截某个请求
猜你喜欢
转载自blog.csdn.net/wyyother1/article/details/108574954
今日推荐
周排行