1. 导入依赖:

  1. <!-- 整合shiro + jwt -->
  2. <dependency>
  3. <groupId>org.crazycake</groupId>
  4. <artifactId>shiro-redis-spring-boot-starter</artifactId>
  5. <version>3.3.1</version>
  6. </dependency>
  7. <!-- 为了简化开发,这里引入了hutool工具类 -->
  8. <dependency>
  9. <groupId>cn.hutool</groupId>
  10. <artifactId>hutool-all</artifactId>
  11. <version>5.7.22</version>
  12. </dependency>
  13. <!-- jwt -->
  14. <dependency>
  15. <groupId>io.jsonwebtoken</groupId>
  16. <artifactId>jjwt</artifactId>
  17. <version>0.9.1</version>
  18. </dependency>