问题描述:
因项目需要,在springboot中需要引入mybatis-plus,在maven引入后,启动过程中报如下的错误:

原因描述:
在项目中,事先已经引入了关于pagehelper相关的依赖:

现在引入了mybatis-plus依赖:

从而产生了冲突,pagehelper是包含了Mybatis以及Mybatis-Spring,而MyBatis-Spring依赖冲突,系统自动用了MyBatis=plus的MyBatis-spring。
解决方法:
如果不需要用到pagehelper-spring-boot-starter相关,可以注释掉pagehelper-spring-boot-starter依赖。
或者可以把pagehelper中的mybatis依赖删除即可。

网友评论