异常提示
Correct the classpath of your application so that it contains a single, compatible version of net.sf.jsqlparser.statement.select.SelectExpressionIte
实际问题
原因:项目中同时使用了 mybatis-plus 和 pagehelper,两者都用到了 jsqlparser 作为 sql 解析器,但引入不同的版本,导致冲突
依赖分析
-
右键——> Analyze
-
快捷键 Ctrl+F 搜索对应冲突包
解决方法
- 升级 mp 版本
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.3.1</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-extension</artifactId>
<version>3.5.3.1</version>
</dependency>
- 或者排除其中较低版本依赖