springboot集成myabtis-plus报错

报错

correct the classpath of your application so that it contains a single, compatible version of com.baomidou.mybatisplus.core.MybatisConfiguration

这个是作者springboot集成mybatis-plus的时候遇到的,但是并不是属于mybati-plus抛出的错误,是springboot给出的jar依赖版本不一致的提示,属于springboot集成其他jar的一个通用错误。

这个报错看不懂的先翻译一下,版本不兼容

解决:既然是版本不兼容,那就修改成兼容的,这里以mybatis-plus-boot-starter为例,我引入的版本是3.1.1,springboot版本是2.1.4,打开仓库https://mvnrepository.com/,搜索mybatis-plus-boot-starter,查看

可以看到3.1.1版本要求我springboot版本是2.1.6,但是我目前引入的是2.1.4

所以选择3.1.0对应2.1.2,springboot2.1.4肯定兼容2.1.2版本

完美解决问题。

猜你喜欢

转载自blog.csdn.net/Mint6/article/details/93379059