Spring Security - 可以继承<security:http>指令吗?

时间:2015-11-18 10:16:25

标签: java spring spring-security

我正在开发像这样的弹簧安全上下文:

<security:http pattern="/path1/**" access-decision-manager-ref="accessDecisionManager" 
        authentication-manager-ref="_authenticationManager1">
    ...

    <security:intercept-url pattern="/path1/login.html*" access="ROLE_ANONYMOUS"/>
    ...
</security:http>

<security:http pattern="/path2/**" access-decision-manager-ref="accessDecisionManager2">
    ...
    <security:intercept-url pattern="/path2/login.html*" access="ROLE_ANONYMOUS"/>
    ...
</security:http>
<security:http pattern="/**" access-decision-manager-ref="accessDecisionManager1">
    ...
    <security:intercept-url pattern="/path1/login.html*" access="ROLE_ANONYMOUS"/>
    ...
</security:http>

第一个指令和最后一个指令在intercept-urls方面是相同的,唯一的区别是url模式;有什么办法可以让最后一个指令延伸到第一个指令吗?

0 个答案:

没有答案