当前位置:网站首页>Invalid bound statement (not found) in idea -- problem solving

Invalid bound statement (not found) in idea -- problem solving

2022-07-05 04:25:00 acwing

Invalid bound statement (not found)

Screenshot of error reporting

** Error reason **

The main reason for such mistakes is to check your own
.xml File corresponding namespace Is it right
Corresponding sql Whether the input parameter type and return type of the field are equal
Corresponding sql Fields must be and mapper The method names in the interface are the same

After eliminating these problems, the rest is whether your file directory is successfully scanned
idea compiler
Check your compiler target Of classes Is there any generated file in
 Insert picture description here

Some are compiler problems
The problem is to ensure that you have the same file path Corresponding interface and xml The file needs the same path
Or the corresponding application Configuration file in Need to set up mapper.xml Find the path of the corresponding method

If you are using Mybatis The generator generator If you use the above method, it still won't work In your own compiler
Delete previously generated files
Regenerate it That's all right.
mvn mybatis-generator:generate

The main thing is to ensure the corresponding target The file needs to have .xml Generate

原网站

版权声明
本文为[acwing]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140642367922.html