一、使用场景
项目引入pagehelper5.3.2.jar和mybatis-plus-boot-starter.3.4.0.jar,在使用page分页时,查询总数使用select count()(想要的:select count(0))
二、问题原因
pagehelper5.3.2.jar内部带了jsqlparser版本为4.5,与mybatis-plus-boot-starter不匹配。
三、处理方法
exclusion排除pagehelper内部的jsqlparser jar包,再重新单独引入合适版本的jsqlparser。
亲试:mybatis-plus-boot-starter.3.4.0与jsqlparser3.2是可以的