springboot和shiro实现用户认证
1、 建立一个父子项目,在子项目中 导入themleaf的依赖
2、建立springboot项目,使之能运行
环境没问题
3、导入shiro整合spring的包
4、编写配置类ShiroConfig,编写UserRealm类
5.、添加shiro的内置过滤器(拦截)
上述设置的登录请求跳转不过去,我直接引入了themleaf依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<version>2.4.4</version>
</dependency>
6、用户认证