一 说明
1.1 工程结构

工程的搭建参考:springboot 整合mybaits实现crud操作(含分页)案例_健康平安的活着的博客-优快云博客_springboot使用mybatis进行crud操作
1.2 分页的配置
1.pom的引入
<!--- baomidou 分页pagetutils -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
<version>2.1.8</version>
</dependency>
</dependencies>
2.设置工具类
public class PageUtils implements Serializable {
private static final long serialVersionUID = 1L;
//总记录数
private int totalCount;
//每页记录数
private int pageSize;
//总页数
private int tota

本文介绍如何在SpringBoot项目中使用MyBatis进行分页查询操作,包括依赖引入、工具类编写及Service层调用等步骤。
最低0.47元/天 解锁文章
974

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



