自定义认证,查询数据库:https://my.oschina.net/liululee/blog/2981194 教程2:https://www.cnblogs.com/liubin0509/p/9716721.html 教程3:https://www.cnblogs.com/hongxf1990/p/6756520.html 教程4:https://blog.csdn.net/wangmx1993328/article/details/88867153?biz_id=102&utm_term=spring security&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduweb~default-0-88867153&spm=1018.2118.3001.4187
目前用的最多的是权限框架有两个:shiro和spring security,shiro底层也是用spring security,spring security更复杂但是更强大,这篇主介绍spring security;
首先参考下官方的
接下来我自定义写我的配置类 1 首先写我的配置类 然后写我的授权规则方法
这里因为前端用了thymeleaf,所以用到了thymeleaf对于security的支持。 首先引入支持包。版本问题需要注意,引入前查询下自己系统对应版本 首先-在html引入sercurity的名称空间 然后
指定登陆页,和自定义账号密码认证url 设置seesion过期时间:https://blog.csdn.net/Dongguabai/article/details/81053660 下图简单设置下