PageHelper是MyBatis开源的物理分页插件,只需要使用PageHelper.startPage(pageNum, pageSize)这一行代码接口完成分页查询。
MyBatis分页插件PageHelper官方文档
PaginationInnerInterceptor是MyBatis-Plus内置的分页插件。
什么是 MyBatis-Plus?
SpringBoot - MyBatis-Plus - 基于PaginationInnerInterceptor的分页查询(三)
在POM.XML中添加以下依赖:2. 修改配置com.github.pagehelper pagehelper-spring-boot-starter 最新版本
在application.yml中添加以下配置: pagehelper: helperDialect: mysql reasonable: true supportMethodsArguments: true params: count=countSql3. 代码编写
// 在controller中使用以下代码完成分页: PageHelper.startPage(1, 10); Listlist = userMapper.selectAll(1);



