Spring Security 3.0.5

こ雲淡風輕ζ 提交于 2019-12-25 05:13:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!