1

私はこの構成を持っています:

<bean id="customizedFilterSecurityInterceptor"
        class="org.springframework.security.web.access.intercept.FilterSecurityInterceptor">
    <property name="authenticationManager" ref="authenticationManager"/>
    <property name="accessDecisionManager" ref="accesDecisionManager"/>
    <property name="securityMetadataSource">
        <security:filter-security-metadata-source use-expressions="true" >
            <security:intercept-url pattern="/css/**" access="permitAll" />
            <security:intercept-url pattern="/js/**" access="permitAll" />
            <security:intercept-url pattern="/externe*.do" access="permitAll" />
            <security:intercept-url pattern="/*.do" access="isAuthenticated() or isRememberMe()" />
        </security:filter-security-metadata-source>
    </property>
</bean>

<bean id="loginUrlAuthenticationEntryPoint"
   class="org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint">
    <property name="loginFormUrl">
            <value>/login.jsp</value>
    </property>
    <property name="forceHttps">
            <value>false</value>
    </property>
</bean>

<bean id="externeServiceInterceptor"  class="fr.global.commun.springSecurity.MySecurityInterceptor">
    <property name="authenticationManager" ref="authenticationManager"/>
    ...
    <property name="securityMetadataSource">
    <security:filter-security-metadata-source use-expressions="true" >
        <security:intercept-url pattern="/externe*.do" access="isAuthenticated()" />
        </security:filter-security-metadata-source>
    </property>

問題は、で始まるすべてのリクエストが/externeログイン ページにリダイレクトされる/*.doことです。

4

1 に答える 1

0

xml ファイルの次のエントリは忘れられていました。

<bean id="springSecurityFilterChain" class="org.springframework.security.web.FilterChainProxy">
    <security:filter-chain-map path-type="ant">
        <security:filter-chain pattern="/externe*.do" filters="externeServiceInterceptor" />
    </security:filter-chain-map>   
</bean>
于 2012-07-12T14:41:07.957 に答える