admin 管理员组

文章数量: 887021


2023年12月17日发(作者:mvc mvvm mvp)

依赖 4.0.0 spring-boot-starter-parent E e MyBatis-Plus_Simple 0.0.1-SNAPSHOT MyBatis-Plus_Simple Demo project for Spring Boot 1.8 spring-boot-starter-web ou mybatis-plus-boot-starter 3.5.1 spring-boot-starter-test test mysql mysql-connector-java tlombok lombok in knife4j-spring-boot-starter 3.0.3

spring-boot-maven-plugin 配置ing: datasource: driver-class-name: url: jdbc:mysql://127.0.0.1:3306/mp?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai username: root password: 222333#mybatis-plus配置控制台打印完整带参数SQL语句mybatis-plus: configuration: log-impl: Impl分页插件的配置(必须)package ;import ;import sPlusInterceptor;import ;import uration;import tionInnerInterceptor;

@Configurationpublic class MyBatisPlusConfig { /** * 分页插件 */ @Bean public MybatisPlusInterceptor mybatisPlusInterceptor() { MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); erInterceptor(new PaginationInnerInterceptor()); return interceptor; }}代码Entity

实现package ;import eImpl;import ;import pper;import rvice;import e;@Servicepublic class UserServiceImpl extends ServiceImpl implements UserService {}Controller

结果:


本文标签: 配置 参数 控制台 打印 语句