【发布时间】:2017-02-01 02:09:15
【问题描述】:
最近我从 Spring Security 3 迁移到版本 4。以前一切正常,但现在没有任何作用。
这是我的spring-security.xml:
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-4.0.xsd">
<http auto-config="true" use-expressions="true">
<intercept-url pattern="/home.MRCMPU" access="permitAll"/>
<intercept-url pattern="/loginFailure.MRCMPU" access="permitAll"/>
<intercept-url pattern="/*.MRCMPU" access="permitAll"/>
<intercept-url pattern="/con" access="permitAll"/>
<form-login
login-page="/home.MRCMPU"
login-processing-url="/login" authentication-success-handler-ref="AuthenticationSuccess"
authentication-failure-handler-ref="AuthenticationFailure" username-parameter="username" password-parameter="password" />
<logout logout-url="/logout.MRCMPU" success-handler-ref="Logout" invalidate-session="true" delete-cookies="true"/>
</http>
<authentication-manager>
<authentication-provider user-service-ref="Authentication"/>
</authentication-manager>
</beans:beans>
谁能从这段代码中找出冲突?
【问题讨论】:
-
分享你得到的异常
-
404 错误表单操作 url 不起作用
-
启动服务器时会出现异常,如果配置不正确......正如我在回答中提到的那样
标签: java xml spring spring-mvc spring-security