[AppleScript] 纯文本查看 复制代码
<!‐‐只要认证通过就可以访问‐‐>
<security:intercept‐url pattern="/index.jsp" access="isAuthenticated()"
/>
<security:intercept‐url pattern="/a.html" access="isAuthenticated()" />
<!‐‐拥有add权限就可以访问b.html页面‐‐>
<security:intercept‐url pattern="/b.html" access="hasAuthority('add')"
/>
<!‐‐拥有ROLE_ADMIN角色就可以访问c.html页面‐‐>
<security:intercept‐url pattern="/c.html" access="hasRole('ROLE_ADMIN')"
/>
<!‐‐拥有ROLE_ADMIN角色就可以访问d.html页面,
注意:此处虽然写的是ADMIN角色,框架会自动加上前缀ROLE_‐‐>
<security:intercept‐url pattern="/d.html" access="hasRole('ADMIN')" />