Spring Security 3.0.5

时间:2011-03-27 05:48:34

标签: spring spring-security

我从Spring Security 3.1.0.m1回滚到3.0.5,但我使用的是security =“none”,而不是3.0.5架构。有谁知道我在3.0.5中如何完成同样的事情?

    <http security="none" pattern="/javax.faces.resource/**" />
    <http security="none" pattern="/services/rest-api/1.0/**" />
    <http security="none" pattern="/preregistered/*" />

2 个答案:

答案 0 :(得分:3)

您需要将多个<http>元素合并为一个包含多个<http>元素的<intercept-url>元素。此外,正如Ritesh所说,您需要在每个filters="none"元素上使用<intercept-url>属性,例如。

<http ... >
    <intercept-url filters="none" pattern="/javax.faces.resource/**" />
    <intercept-url filters="none" pattern="/services/rest-api/1.0/**" />
    <intercept-url filters="none" pattern="/preregistered/*" />
    <intercept-url pattern="... your other patterns..." access="..."/>
    ...
</http>

希望这有帮助!

答案 1 :(得分:2)

使用属性filters =“none”。另请参阅Intercept-URL element