一、 MP的学习1、导入依赖12345<dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.5.1</version></dependency> 2、MP生成日志1234567mybatis-plus: global-config: db-config: id-type: auto //id设置为自增,默认是雪花算法生成的id table-prefix: sys_//数据库表的前缀 configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl//控制台输出 3、MP的分页配置类12345678910@Configurationpublic class MPconfig { @Bean public MybatisPlusInterceptor mybatisPlusInterceptor(){ MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();//拦截器 mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor());//分页拦截器 return mybatisPlusInterceptor; }}