Open LeiYuBoGitHub opened 1 year ago
spring-boot-starter-web [3.0.6] mysql-connector-java [5.1.46] druid [1.2.17] mybatis-plus-boot-starter [3.5.3.1] pagehelper-spring-boot-starter [1.4.3]
try (Page<Object> page = PageHelper.startPage(request.getPage(), 10)) { StudentParam param = new StudentParam(); param.setId(request.getStudentId()); param.setPhone(request.getPhone()); param.setCardNo(request.getCardNo()); param.setAccount(request.getAccount()); beanList = studentRepository.getList(param); total = Long.valueOf(page.getTotal()).intValue(); }
升级 pagehelper-spring-boot-starter 从1.4.3 到1.4.6 即可解决
能否简单解释下为什么导致此问题 还是因为1.4.3不支持spring boot 过高版本
可以看看更新日志中有没有对这里有影响的。
遇到和你一样的问题,就是版本依赖不兼容导致的,这得看源码了,springboot高版本必须匹配高版本的第三方jar包,或者降低springboot的版本
依赖模块
分页代码
问题 分页失败 导致全量查询 数据库IO请求飙升
解决方案
升级 pagehelper-spring-boot-starter 从1.4.3 到1.4.6 即可解决
需求
能否简单解释下为什么导致此问题 还是因为1.4.3不支持spring boot 过高版本