报错原因:SpringBoot 与 MyBatis Plus版本不匹配!
解决方法:
把SpringBoot版本改为v3.1.6 同时 MyBatis Plus版本改为3.5.3!
1. 打开项目的pom.xml文件。修改springboot的版本号,如下图:
2. 修改MyBatis Plus及其相关组件的版本号,如图:
3. 附上我的pom.xml代码:
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
org.springframework.boot
spring-boot-starter-parent
3.1.6
com.example
smartmine
0.0.1-SNAPSHOT
smartmine
Demo project for Spring Boot
17
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-starter-web-services
com.mysql
mysql-connector-j
runtime
com.baomidou
mybatis-plus-boot-starter
3.5.3
com.baomidou
mybatis-plus
3.5.3
com.baomidou
mybatis-plus-generator
3.3.0
org.apache.velocity
velocity-engine-core
2.3
org.springframework.boot
spring-boot-starter-test
test
com.alibaba
fastjson
1.2.59
org.projectlombok
lombok
true
org.springframework.boot
spring-boot-maven-plugin
org.projectlombok
lombok
src/main/java
**/*.yml
**/*.properties
**/*.xml
false
src/main/resources
**/*.yml
**/*.properties
**/*.xml
false
lib
**/*.jar
推荐阅读
您阅读本篇文章共花了:
发表评论