推荐版本
<!-- mybatis-plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.1</version>
</dependency>
注意:如果是mybatis-plus替换mybatis时需要将mybatis依赖删除
<!-- pagehelper 分页-->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<optional>true</optional>
<version>1.4.1</version>
</dependency>
pagehelper 版本太低启动时会出现Factory method 'sqlSessionFactory' threw exception; nested exception is java错误
pagehelper 从1.2.6升到1.4.1版本后pagehelper.page-size-zero=true替换成pagehelper.pageSizeZero=true才能在 PageHelper.startPage(page, size);page和size都为0时查询所有数据
同时:
#解决升级 Spring Boot 2.6后,因循环引用导致启动时报错的问题
spring.main.allow-circular-references=true
标签:pagehelper,plus,mybatis,PageHelper,true,size From: https://www.cnblogs.com/IcedEspresso/p/16588085.html