1.依赖
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.10</version>
</dependency>
2…
PageHelper.startPage(page, pageSize); List<Content> list = contentMapper.findAll(content); PageInfo pageInfo = new PageInfo(list);