办法:
修改pom.yml。加上第四行的代码即可。
解决办法:
修改配置文件pom.yml。如下的16-17行。
上图做到了将 mybatis里面的sql 打印到控制台的功能。
springboot和mybatis plus 手动在后端实现分页功能应该要用到拦截器。
@Configuration
public class MPConfig {
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor(){
MybatisPlusInterceptor interceptor=new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
return interceptor;
}
}
以上是配置拦截器的代码。不是很懂。去看黑马视频。



