问题
I'm rolling back from Spring Security 3.1.0.m1 to 3.0.5 but I'm using the security="none" and that's not in the 3.0.5 schema. Anyone know how I accomplish the same thing in 3.0.5?
<http security="none" pattern="/javax.faces.resource/**" />
<http security="none" pattern="/services/rest-api/1.0/**" />
<http security="none" pattern="/preregistered/*" />
回答1:
Use attribute filters="none". Please also see Intercept-URL element
回答2:
You'll need to consolidate the multiple <http> elements into a single <http> element with multiple <intercept-url> elements. Additionally, as Ritesh says, you will need to use the filters="none" attribute on each of these <intercept-url> elements, e.g.
<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>
Hope this helps!
来源:https://stackoverflow.com/questions/5447499/spring-security-3-0-5