控制台报错信息:
escription:
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:/maven/repository/com/github/jsqlparser/jsqlparser/1.0/jsqlparser-1.0.jar!/net/sf/jsqlparser/schema/Column.class
The class hierarchy was loaded from the following locations:
net.sf.jsqlparser.schema.Column: file:/E:/maven/repository/com/github/jsqlparser/jsqlparser/1.0/jsqlparser-1.0.jar
net.sf.jsqlparser.parser.ASTNodeAccessImpl: file:/E:/maven/repository/com/github/jsqlparser/jsqlparser/1.0/jsqlparser-1.0.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of net.sf.jsqlparser.schema.Column
折磨我一下午,死活不行。一开始以为是依赖冲突,一直在排除包,发现无效。直到看到这个回答
https://segmentfault.com/q/1010000040922012
是版本太低了,导致报错,使用3.2也不行,在父pom中添加版本约束,成功解决。
<dependency>
<groupId>com.github.jsqlparser</groupId>
<artifactId>jsqlparser</artifactId>
<version>4.0</version>
</dependency>