How to Solve org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) Error

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) problem, that is, there is a problem when mapping and binding the dao interface and mapper configuration file in mybatis. Simply put, the interface and xml are either not found It is either

After the modification, the problem still exists. In the end, it took a lot of effort to find the source of my code problem. The file name of the dao interface is inconsistent with that of the xml.

Both the interface name and the interface file name are DepartmentDao, and the configuration file name is DeparmentDao.xml. It took a lot of effort to find a t letter in the names of both. After the modification, everything is normal.

This is a point that is easy to overlook. Remember: the interface name and the Mybatis mapping file name must be exactly the same.

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *