Spring boot mybatis error: invalid bound statement (not found)

Time:2020-6-16

1. problem description

Create a new springboot project to integrate mybatis, mapper.xml The file is placed under resource mybatis.mapper Directory:
Spring boot mybatis error: invalid bound statement (not found)
Start the project, execute the query SQL error in XML:
Spring boot mybatis error: invalid bound statement (not found)
SQL is not bound.

2. Debugging and tracking

Debug discovery when project can be started mapper.xml Could not load.
Various comparison and tracking source code discovery, when
Mapper locations set to classpath:mybatis.mapper/ * Mapper.xml
The procedure is normal.

3. Results

It is found that there is a problem in the establishment of the directory file under resource.
Spring boot mybatis error: invalid bound statement (not found)
It is not a secondary directory folder, but a folder named“ mybatis.mapper “First level documents. By re creating a mybatis folder and a mapper subfolder, the result is a problem.
Spring boot mybatis error: invalid bound statement (not found)