springboot使用PageHelper.startPage()方法无效
刚开始遇到这个问题的时候在网上也找到了很多解决办法,但都没有解决我的问题。
#pagehelper分页插件配置 以下属性不加也可以实现分页功能
方法一 :
在application.properties中配置如下配置文件
pagehelper.helperDialect=mysql
pagehelper.reasonable=true
pagehelper.supportMethodsArguments=true
pagehelper.params=count=countSql
但是好像并没有什么用。
方法二 :
更换pom.xml文件
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>5.1.2</version>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-autoconfigure</artifactId>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.3</version>
</dependenc