maven依赖
<!--pagehelper -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.5</version>
</dependency>
properties配置
#pagehelper分页插件配置
pagehelper.helperDialect=mysql
entity-Pagination(分页类)
这个类只是为了封装返回结果 可以理解为vo
package com.zrt.entity;
import com.github.pagehelper.Page;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* 分页继承类
*/
@ApiModel(value="分页类")
public class Pagination implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当前页数
*/
@ApiModelProperty(value="当前页",example="