spring security3 当中 在http中 配置<intercept-url pattern='/login.htm*' filters='none'/>会报如下错
严重:Exceptionsendingcontextinitializedeventtolistenerinstanceofclassorg.springframewor...
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: 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 [spring-security.xml] 展开
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: 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 [spring-security.xml] 展开
4个回答
展开全部
<s:http pattern="/commons/**" security="none"/>
<s:http pattern="/js/**" security="none"/>
<s:http pattern="/css/**" security="none"/>
<s:http pattern="/images/**" security="none"/>
<s:http auto-config="true" use-expressions="true">
<s:form-login login-page="/login.do" default-target-url="/" authentication-failure-url="/login.do?error=true" />
<s:logout logout-success-url="/" />
</s:http>
这样配置即可
<s:http pattern="/js/**" security="none"/>
<s:http pattern="/css/**" security="none"/>
<s:http pattern="/images/**" security="none"/>
<s:http auto-config="true" use-expressions="true">
<s:form-login login-page="/login.do" default-target-url="/" authentication-failure-url="/login.do?error=true" />
<s:logout logout-success-url="/" />
</s:http>
这样配置即可
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你用的什么版本?我这里3.0.2还是可以这样写的啊。
不过登陆界面一般是用
<form-login login-page="/login.jsp" authentication-failure-url="/login.jsp?error=true" login-processing-url="/j_security_check"/>
不过登陆界面一般是用
<form-login login-page="/login.jsp" authentication-failure-url="/login.jsp?error=true" login-processing-url="/j_security_check"/>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你写错了吧 filters="none" 应该是双引号
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询