两个核心的包引过来就可以:
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo;
1.springboot项目:引用分页插件
pagehelper-spring-boot
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
</dependency>
2.yml文件配置
pagehelper:
auto-dialect: com.github.pagehelper.dialect.helper.MySqlDialect
3.配置可以扫描的yml
spring:
profiles:
active: ${spring_profile:dev}
include:
- 'repositroy'