1 pom.xml中 核对是否引入 分页插件库
2 核对 springboot 配置文件中分页插件是否配置 (yml配置如下)
#pagehelper分页插件 pagehelper: helperDialect: mysql reasonable: true supportMethodsArguments: true params: count=countSql
3 检查分页插件拦截器是否启用
@Configuration
public class MybatisPlusConfig
{
@Bean
public PaginationInterceptor paginationInterceptor() {
PaginationInterceptor page = new PaginationInterceptor();
page.setDialectType("mysql");
return page;
}
}