6.3
学习了使用sa-token
配置pom
<properties> <maven.compiler.source>17</maven.compiler.source> <maven.compiler.target>17</maven.compiler.target> <spring-cloud.version>2022.0.2</spring-cloud.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <alibaba.version>2022.0.0.0-RC2</alibaba.version> <mysql.verison>8.0.30</mysql.verison> <fastjson.version>2.0.21</fastjson.version> <lombok.version>1.18.20</lombok.version> <mybatisplus.version>3.5.3.1</mybatisplus.version> <spring.boot.version>3.1.5</spring.boot.version> <pagehelper.version>1.4.3</pagehelper.version> <hutool.version>5.8.18</hutool.version> <knife4j.version>4.3.0</knife4j.version> <sa-token.version>1.37.0</sa-token.version> <druid.version>1.2.20</druid.version> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>${spring.boot.version}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId> <version>${druid.version}</version> </dependency> <!-- Sa-Token 权限认证,在线文档:https://sa-token.cc --> <dependency> <groupId>cn.dev33</groupId> <artifactId>sa-token-spring-boot3-starter</artifactId> <version>${sa-token.version}</version> </dependency> <!-- Sa-Token 权限认证(Reactor响应式集成),在线文档:https://sa-token.cc --> <dependency> <groupId>cn.dev33</groupId> <artifactId>sa-token-reactor-spring-boot3-starter</artifactId> <version>${sa-token.version}</version> </dependency> <dependency> <groupId>cn.dev33</groupId> <artifactId>sa-token-redis-jackson</artifactId> <version>${sa-token.version}</version> </dependency> <dependency> <groupId>com.github.xiaoymin</groupId> <artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId> <version>${knife4j.version}</version> </dependency> <!-- mybatisplus和spring boot整合的起步依赖 --> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>${mybatisplus.version}</version> </dependency> <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-all</artifactId> <version>${hutool.version}</version> </dependency> <!-- mysql驱动 --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>${mysql.verison}</version> </dependency> <!--fastjson--> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>${fastjson.version}</version> </dependency> <!-- lombok依赖 --> <dependency>