Spring security 如何禁用URL的所有自定义和核心SpringSec筛选器?

Spring security 如何禁用URL的所有自定义和核心SpringSec筛选器?,spring-security,Spring Security,使用SpringSecurity3.0.5,我创建了一个自定义过滤器 web.xml <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filt

使用SpringSecurity3.0.5,我创建了一个自定义过滤器

web.xml

<filter>
    <filter-name>springSecurityFilterChain</filter-name>
    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>

<filter-mapping>
    <filter-name>springSecurityFilterChain</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

<filter>
    <filter-name>XAuthToken</filter-name>
    <filter-class>com.mckesson.security.filters.XAuthToken</filter-class>
</filter>
<filter-mapping>
    <filter-name>XAuthToken</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>    
<http auto-config="true">
    <intercept-url pattern="/**/foo/bar" filters="none" />  
    <intercept-url pattern="/**/**"/>
    <logout logout-success-url="/login.jsp" logout-url="/logout" />
</http>
但是,当我访问
http://localhost:8080/app/.../foo/bar
,我的Tomcat日志中会显示一条打印语句,指示我的自定义筛选器已运行


如何禁用所有自定义和核心Spring安全过滤器?

这不完全是您想要做的,因为您想要登录,但不想要任何安全的东西。但是,您可以创建一个单独的领域(在一个配置中可以有多个
标记),只需完全关闭安全性:

<http pattern="/unsecured/**" security="none"/>

显然,模式可以是任何你想要的。
我不确定这是否正是您所要求的。

不幸的是,我的web应用程序的路由并没有分为
/unsecured
/secured
。事实证明我只使用了web.xml筛选器,而不是spring security