<xmlns:s="http://www.springframework.org/schema/security"
<s:http auto-config="true" use-expressions="true">
<s:form-login login-page="/login.action" authentication-failure-url="/login.action?error=true" authentication-success-handler-ref="authenticationSuccessHandler" login-processing-url="/securityLogin.action" />
<s:logout logout-success-url="/" logout-url="/securityLogout.action" />
<s:remember-me user-service-ref="userManager" key="e37f4b31-0c45-11dd-bd0b-0800200c9a66" />
<s:custom-filter ref="customizeInterceptor" before="FILTER_SECURITY_INTERCEPTOR" />
</s:http>
<bean id="customizeInterceptor" class="com.nico.modules.security.springsecurity.CustomizeInterceptor">
<property name="authenticationManager" ref="authenticationManager" />
<property name="accessDecisionManager" ref="accessDecisionManager" />
</bean>
<s:authentication-manager alias="authenticationManager">
<s:authentication-provider user-service-ref="userManager">
<s:password-encoder ref="passwordEncoder" />
</s:authentication-provider>
</s:authentication-manager>
当我登录authenticationManager
时可以有效,但在自定义过滤器中,对象为login.action?error= true
FilterInvocation:网址:/login.action?error=true
代码:“CustomizeInterceptor”中的“securityMetadataSource”定义获取它的方法