When using LambdaQueryWrapper, an error occurs: Invalid bound statement (not found): com.studentos.mapper.UserMapper.insert

1. Problem

使用LambdaQueryWrapper 报错org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.studentos.mapper.UserMapper.insert

(Translation: SQL statement binding error (not found) occurred when using LambdaQueryWrapper)

2. Screenshot display of the problem

Insert image description here

3. Solution ideas

				第一种:mapper.xml中的namespace和实际的mapper文件不一致
				第二种:mapper接口中的方法名和mapper.xml中的id标签不一致
				第三种:Mapper.xml没有构建进去
				第四种:配置文件导不出来
				第五种:依赖没有配置正确

4. Problems arising from the project

The dependency was not imported, resulting in a SQL binding error (not found) when using LambdaQueryWrapper.
I have been stuck here for a while, hahaha. I accidentally saw a dependency on the mybatis official website one night, and suddenly I got the idea. . . Just add the dependency coordinates to the pom.xml configuration file. . .

Insert image description here

 		<dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <version>3.4.2</version>
        </dependency>

Let’s transplant hair together!

Guess you like

Origin blog.csdn.net/qq_24484317/article/details/128439180