報錯如下:
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
com.github.jeffreyning.mybatisplus.base.UpdateByMultiIdMethod.injectMappedStatement(UpdateByMultiIdMethod.java:67)
The following method did not exist:
com.github.jeffreyning.mybatisplus.base.UpdateByMultiIdMethod.optlockVersion(Lcom/baomidou/mybatisplus/core/metadata/TableInfo;)Ljava/lang/String;
The method's class, com.github.jeffreyning.mybatisplus.base.UpdateByMultiIdMethod, is available from the following locations:
jar:file:/D:/Soft/Environment/repository/com/github/jeffreyning/mybatisplus-plus/1.5.0-RELEASE/mybatisplus-plus-1.5.0-RELEASE.jar!/com/github/jeffreyning/mybatisplus/base/UpdateByMultiIdMethod.class
The class hierarchy was loaded from the following locations:
com.github.jeffreyning.mybatisplus.base.UpdateByMultiIdMethod: file:/D:/Soft/Environment/repository/com/github/jeffreyning/mybatisplus-plus/1.5.0-RELEASE/mybatisplus-plus-1.5.0-RELEASE.jar
com.baomidou.mybatisplus.core.injector.AbstractMethod: file:/D:/Soft/Environment/repository/com/baomidou/mybatis-plus-core/3.2.0/mybatis-plus-core-3.2.0.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of com.github.jeffreyning.mybatisplus.base.UpdateByMultiIdMethod
程序已結束,退出代碼為 1
嘗試了檢視pom中依賴問題,也已經修改了,但還是報這個錯。
自己使用的這兩個包的版本會發生沖突
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>com.github.jeffreyning</groupId>
<artifactId>mybatisplus-plus</artifactId>
<version>1.5.0-RELEASE</version>
</dependency>
将mybatis-plus-boot-starter包的版本修改為3.1.0後項目可以起起來了