最近关于spring security 不再支持 filters=none 我们有了新的解决办法方法如下
[java]
<security:http autoconfig=true>
<! loginpage >
<security:formlogin loginpage=/loginjsp/>
<! 对登录页面不进行拦截 后面的*主要是请求页面可能会带有一些参数>
<security:intercepturl pattern=/loginjsp* filters=none/>
<security:intercepturl pattern=/** access =ROLE_USER/>
</security:http>
<security:http autoconfig=true>
<! loginpage >
<security:formlogin loginpage=/loginjsp/>
<! 对登录页面不进行拦截 后面的*主要是请求页面可能会带有一些参数>
<security:intercepturl pattern=/loginjsp* filters=none/>
<security:intercepturl pattern=/** access =ROLE_USER/>
</security:http>
[html]
<security:http autoconfig=true>
<! loginpage >
<security:formlogin loginpage=/loginjsp/>
<! 对登录页面不进行拦截 后面的*主要是请求页面可能会带有一些参数>
<security:intercepturl pattern=/loginjsp* filters=none/>
<security:intercepturl pattern=/** access =ROLE_USER/>
</security:http>
<security:http autoconfig=true>
<! loginpage >
<security:formlogin loginpage=/loginjsp/>
<! 对登录页面不进行拦截 后面的*主要是请求页面可能会带有一些参数>
<security:intercepturl pattern=/loginjsp* filters=none/>
<security:intercepturl pattern=/** access =ROLE_USER/>
</security:http>
系统报错如下
orgspringframeworkbeansfactoryparsingBeanDefinitionParsingException: Configuration problem: The use of filters=none is no longer supported Please define a separate <http> element for the pattern you want to exclude and use the attribute security=none
Offending resource: class path resource [applicationContextxml]
后来在网上查资料
不再支持 filters=none 应该改成
[java
<span ><security:* security=none/></span>
<security:http autoconfig=true>
<! loginpage >
<security:formlogin loginpage=/loginjsp/>
<! 对登录页面不进行拦截 后面的*主要是请求页面可能会带有一些参数>
<security:intercepturl pattern=/** access =ROLE_USER/>
</security:http>
<span ><security:* security=none/></span>
<security:http autoconfig=true>
<! loginpage >
<security:formlogin loginpage=/loginjsp/>
<! 对登录页面不进行拦截 后面的*主要是请求页面可能会带有一些参数>
<security:intercepturl pattern=/** access =ROLE_USER/>
</security:http>
[java]
<SPAN><security:* security=none/></SPAN>
<security:http autoconfig=true>
<! loginpage >
<security:formlogin loginpage=/loginjsp/>
<! 对登录页面不进行拦截 后面的*主要是请求页面可能会带有一些参数>
<security:intercepturl pattern=/** access =ROLE_USER/>
</security:http>