1.@RequiresPermissions(value={"student:read","teacher:update"},logical=Logical.OR)
2.//必须同时属于student和teacher角色
3.@RequiresRoles({"student","teacher"})
本文探讨了Shiro框架中用于权限控制的@RequiresPermissions注解及其逻辑配置,并介绍了如何通过@RequiresRoles注解实现对用户角色的要求。
1.@RequiresPermissions(value={"student:read","teacher:update"},logical=Logical.OR)
2.//必须同时属于student和teacher角色
3.@RequiresRoles({"student","teacher"})
3230
1万+