I tried to integrate spring boot and mybatis, but the runtime always reported the error of Invalid bound statement (not found). After searching, many people thought that mapper could not be found. I used the tool to generate mapper, which has two parts: interface and xml file. How should the xml file location be configured in application.yml? My current configuration is as follows
spring: datasource: username: root password: url: jdbc:mysql://localhost:3306/test driver-class-name: com.mysql.jdbc.Driver mybatis: mapperLocations: classpath:mapping/*.xml
The problem has been solved. It is mapper’s xml file path configuration problem.