1、用户 角色 资源的关系
2、实现思路
3、参考资料
Spring Boot Security +Redis 实现简单权限控制
将返回结果变成json 响应改客户端 在第六项
4、实现代码
/huyande/springsecurity.git
5、其他问题记录
在使用springboot 2.1.X 版本 ,使用 thymeleaf-extras-springsecurity4 部分页面的标签会失效 ,创建项目时使用2.0.x的Springboot。
6、其他
sec:authorize="isAuthenticated()":是否授权成功sec:authentication="principal.authorities":获取用户身份sec:authentication="name":获取用户名字sec:authorize="hasRole()":判断当前身份两个用户