摘要: 1导入依赖 <!--redis依赖--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <! 阅读全文
posted @ 2023-04-22 16:14 帕拉利斯 阅读(12) 评论(0) 推荐(0)
摘要: Authentication接口: 它的实现类,表示当前访问系统的用户,封装了用户相关信息。 AuthenticationManager接口:定义了认证Authentication的方法 UserDetailsService接口:加载用户特定数据的核心接口。里面定义了一个根据用户名查询用户信息的方法 阅读全文
posted @ 2023-04-22 16:05 帕拉利斯 阅读(53) 评论(0) 推荐(0)
摘要: 登录校验流程 SpringSecurity完整流程 ​ SpringSecurity的原理其实就是一个过滤器链,内部包含了提供各种功能的过滤器。这里我们可以看看入门案例中的过滤器。 ​ 图中只展示了核心过滤器,其它的非核心过滤器并没有在图中展示。 UsernamePasswordAuthentica 阅读全文
posted @ 2023-04-22 16:01 帕拉利斯 阅读(61) 评论(0) 推荐(0)
摘要: ​我们先要搭建一个简单的SpringBoot工程 导入依赖 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.5.0< 阅读全文
posted @ 2023-04-22 15:43 帕拉利斯 阅读(12) 评论(0) 推荐(0)
摘要: Spring Security 1,是Spring家族中的一个安全管理框架 相比与另外一个安全框架Shiro 它提供了更丰富的功能 市区资源也比Shiro丰富 2,一般来说中大小的项目都使用SpringSecurity来做安全框架 小项目有Shiro的比较多 因为相比 与SpringSecurity 阅读全文
posted @ 2023-04-22 15:37 帕拉利斯 阅读(32) 评论(0) 推荐(0)