1 <!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉。 --> 2 <build> 3 <resources> 4 <resource> 5 <directory>src/main/java</directory> 6 <includes> 7 <include>**/*.properties</include> 8 <include>**/*.xml</include> 9 </includes> 10 <filtering>false</filtering> 11 </resource> 12 </resources> 13 </build>
如果错误提示为加载不到.xml和.properties文件,则在pom中增加以上代码