对于不需要身份验证的资源,请省略其中的
<auth-constraint>元素
<security-constraint>:
<security-constraint> <web-resource-collection> <web-resource-name>app</web-resource-name> <url-pattern>/info</url-pattern> </web-resource-collection> <!-- OMIT auth-constraint --></security-constraint><security-constraint> <web-resource-collection> <web-resource-name>app</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>Role</role-name> </auth-constraint></security-constraint>



