idea of using mybastis reported Invalid bound statement (not found)

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> 
And recommended Project Structure - will> Modules you store the packet mapper marked as resources


Guess you like

Origin www.cnblogs.com/heavensward/p/11783097.html