Spring 旁路弹簧安全

Spring 旁路弹簧安全,spring,spring-security,Spring,Spring Security,我有一个web服务,我希望每个人都能访问这个服务 在web.xml中 <filter> <filter-name>springSecurityFilterChainRendering</filter-name> <filter-class> org.springframework.web.filter.DelegatingFilterProxy </filter-class> </filte

我有一个web服务,我希望每个人都能访问这个服务

在web.xml中

<filter>
    <filter-name>springSecurityFilterChainRendering</filter-name>
    <filter-class>
        org.springframework.web.filter.DelegatingFilterProxy
    </filter-class>
</filter>
    <filter-mapping>
           <filter-name>springSecurityFilterChainRemoting</filter-name>
           <url-pattern>/cxf/*</url-pattern>
    </filter-mapping> 

springSecurityFilterChainRendering
org.springframework.web.filter.DelegatingFilterProxy
springSecurityFilterChainRemoting
/cxf/*
在filters-chain-remoting.xml中

       <bean id="springSecurityFilterChainRemoting" class="org.springframework.security.util.FilterChainProxy">
    <security:filter-chain-map path-type="ant">
        <!-- Remoting: stateful WebServices; 
            httpSessionContextIntegrationFilter creates SecurityContext 
            and populates it with information obtained from the HttpSession. 
            contextFilter supplies context with 
            the current project for the current HTTP user session; 
            securityFilter authenticates the user. -->

         <security:filter-chain pattern="/cxf/KioskService/**"
            filters="none"/>

        <security:filter-chain pattern="/cxf/**"
            filters="httpSessionContextIntegrationFilter, contextFilter,securityFilter"/>

    </security:filter-chain-map>
</bean>


我怎样才能绕过这些过滤器,让每个人都使用这项服务呢。服务名称KioskService

将web.xml筛选器映射定义更改为:

<url-pattern>/cxf/*</url-pattern>
/cxf/*
只截取您希望安全的URL