Original https://www.jianshu.com/p/a9516bcd3cb0
If our mapper.xml files are not placed in the src-main-resources below it will not be maven build plugin to default scanned. At this point you need to modify the startup module pom file, which joined in the build tag:
<build>
<resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> <include>**/*.properties</include> </includes> <filtering>true</filtering> </resource> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.xml</include> <include>**/*.properties</include> </includes> <filtering>true</filtering> </resource> </resources> </build>