在项目的web.xml文件中权限配置
< security-constraint >
< web-resource-collection >
< web-resource-name > acegi </ web-resource-name >
< description > web 资源的声明式安全配置 </ description >
< url-pattern > /acegi/reg </ url-pattern >
<!-- 三种提交方式必须大写 -->
< http-method > POST </ http-method >
< http-method > GET </ http-method >
< http-method > PUT </ http-method >
</ web-resource-collection >
<!-- 只有以下用户可以上面的 url-pattern 进行操作 -->
< auth-constraint >
< role-name > admin </ role-name >
< role-name > japankn </ role-name >
</ auth-constraint >
</ security-constraint >