Solve org apache. ibatis. binding. BindingException: Invalid bound

Time:2022-1-7

Solve org apache. ibatis. binding. Bindingexception: invalid bound statement (not found)

org. apache. ibatis. binding. Bindingexception: invalid bound statement (not found), that is, in mybatis, there is a problem in the mapping binding between Dao interface and mapper configuration file. In short, the interface and XML can not be found or found but can not match.

The screenshot shows the common reasons found in the network:

Solve org apache. ibatis. binding. BindingException: Invalid bound

After the revision, the problem still exists. Finally, it took a lot of effort to find the root cause of their own code problems. Dao interface is inconsistent with the file name of XML.

Both the interface name and the interface file name are departmentdao, and the configuration file name is departmentdao XML, it took a lot of effort to see the two names and look up a T letter. After the modification, everything is normal.

As like as two peas, the interface name as like as two peas and Mybatis must be exactly the same as the mapping file name. This is a point that can easily be overlooked. Remember that the name of the mapping name of the interface name and Mybatis must be exactly the same.

————————————————

Copyright notice: This is the original article of CSDN blogger “Sun Dacheng _sunrobin”, which follows the CC 4.0 by-sa copyright agreement. Please attach the original source link and this notice for reprint.

Original link:blog.csdn.net/sundacheng1989/artic…

This work adoptsCC agreement, reprint must indicate the author and the link to this article