1.在springboot项目的pom.xml 文件里加入redis的jar依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-re...
教程
mybatis-plus 表名添加前缀
1、使用mybatis-plus自身的查询构造去,只需要在全局配置中添加如下配置 mybatis-plus: mapper-locations: classpath:mappers/*Mapper.xml # mapper映射文件 global-config: db-config: table-prefix: tr_...
SpringBoot实体类对象和json格式的转化
1.引入maven依赖 <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.62</version> </dependency>...
搭建MyBatis-Plus框架并进行数据库增删改查功能
添加依赖 引入 Spring Boot Maven: <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.4...
SpringBoot 拦截器授权登录
上一篇文章介绍了SpringBoot自定义注解实现Token校验,适用于在控制器有很少的方法需要拦截,如果是后台的话,大部分是需要拦截的,每个方法上面写注解很麻烦,就可以直接使用拦截器来实现 只需要注解的文件删掉...
SpringBoot自定义注解实现Token校验
1.定义Token的注解,需要Token校验的接口,方法上加上此注解 import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java...