Invalid bound statement (not found): solution

1. Check whether the method name in Mapper.xml is consistent with the Dao class method. If annotations are used, check whether the SQL statement exists.

2. Check whether the namespace in the Mapper.xml file is the correct fully qualified name of the Dao class

3. Check whether the method return value in the Mapper.xml file is consistent with the method return value of the Dao class. For ResultMap, pay attention to whether the type is correct. For ResultType, pay attention to the type of a record that returns the result.

4. Check whether the path of Mapper.xml in the configuration file or configuration class is correct

5. The spring configuration file is written incorrectly

For example: using mybatis-plus , but writing the configuration file of mybatis

6. In the spring configuration file , no new mapper file package was added, resulting in no permissions.

 


 

Guess you like

Origin blog.csdn.net/m0_58823014/article/details/130751408