分页查询
分页查询是日常开发中比较常用的功能。MyBatis框架下也有很多插件实现分页功能,比如pageHelper。这是一款非常简单、易用的分页插件,能很好地集成在Spring Boot中。pageHelper是一款基于MyBatis的数据库分页插件,所以我们在使用它时需要使用MyBatis作为持久层框架。下面通过示例演示pageHelper实现分页查询。
1.添加pageHelper依赖
修改pom.xml文件,添加pageHelper依赖:
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId></