自定义realm实现授权

对用户和权限封装

 更具用户查询已经拥有的角色

实现类

 根据用户查询已经拥有的权限

原文地址:https://www.cnblogs.com/xiaozhang666/p/12053339.html