mybatis plus因为jar冲突容易出现Invalid bound statement (not found)错误,怎么解决呢?
1、依赖jar中删除mybatis、mybatis-spring相关jar,因为mybatis plus引入后自带
2、如果引用了com.github.pagehelper的话,同样也得要排除相关jar,如果还要其他的也如下处理:
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
</exclusion>
<exclusion>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
</exclusion>
</exclusions>
</dependency>
版权声明:本文为wyongan原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。