An attempt was made to call a method that does not exist
依赖冲突完整报错如下
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor.<clinit>(PaginationInnerInterceptor.java:70)
The following method did not exist:
net.sf.jsqlparser.schema.Column.withColumnName(Ljava/lang/String;)Lnet/sf/jsqlparser/schema/Column;
The method's class, net.sf.jsqlparser.schema.Column, is available from the following locations:
jar:file:/E:/apache-maven-3.8.1-bin/localMaven3.8.1/com/github/jsqlparser/jsqlparser/3.2/jsqlparser-3.2.jar!/net/sf/jsqlparser/schema/Column.class
The class hierarchy was loaded from the following locations:
net.sf.jsqlparser.schema.Column: file:/E:/apache-maven-3.8.1-bin/localMaven3.8.1/com/github/jsqlparser/jsqlparser/3.2/jsqlparser-3.2.jar
net.sf.jsqlparser.parser.ASTNodeAccessImpl: file:/E:/apache-maven-3.8.1-bin/localMaven3.8.1/com/github/jsqlparser/jsqlparser/3.2/jsqlparser-3.2.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of net.sf.jsqlparser.schema.Column
Process finished with exit code 1
MavenHelper
它可以帮助我们更好的管理Maven的依赖
这里我们需要借助一个插件——MavenHelper
下载好插件后,随便打开一个pom.xml文件,点击红框内
可进入下面的页面
点击对应的依赖,可以查看具体的冲突
也可以根据具体的冲突查看到底是哪一块pom出了问题
右击可选择查看模式
- Jump to Left Tree
- 以树形查看依赖
- Jump to Source
- 在pom.xml 文件中查看依赖
- 直接跳转到对应的依赖处
- Exclude
- 将该依赖排除
- 这是比较常用的,点击之后,pom中会自动生成排除的代码
最后再去页面中刷新一下UI以及重新导入,就可以看到冲突消失了
冲突消失后,上面会出现No conflicts
的字样