出现问题:
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): xxx.xxx.xxx.xxx.xxxMapper.xxx
版本:
spring3、mybatisplus3.5.4及其以上版本
解决方式:
根据Mybatis Plus官网介绍:引入 MyBatis-Plus 之后请不要再次引入 MyBatis。
只需要引入mybatis-plus-spring-boot3-starter即可
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
<version>3.5.7</version>
</dependency>
并检查Mapper类中是否继承了BaseMapper以及正确指定了泛型
@Mapper
public interface UserMapper extends BaseMapper<User> {
}