看了很多文章都没说清楚怎么集成mybatis-plus + PageHelper,搞了挺久的不是报错就是缺少包,后面解决了特此记录一下。
先说配置pom和applocation.yml
mybatis + pagehelper
pom文件:
<!--pagehelper分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.5</version>
</dependency>
application.yml
pagehelper:
auto-dialect: mysql
reasonable: