//第一步:pom导入依赖
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.4.1</version>
</dependency>
//第二步:在接口引入PageHelper(注:该行代码要放在list数据之前,否则分页失败)
PageHelper.startPage(currentPage,pageSize);
//第三步:创建PageInfo对象,将list数据导入
PageInfo<> xxx = new PageInfo<>(list);
//第四步:将xxx对象响应给前端
SpringBoot中使用PageHelper分页插件
于 2022-07-11 17:48:34 首次发布
476

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



