1 pom.xml中 核对是否引入 分页插件库
<!-- 分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.3</version>
</dependency>
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;
}
}

9822



被折叠的 条评论
为什么被折叠?



