1、在pom.xml加入
<build> <resources> <resource> <directory>${basedir}/src/main/java</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> </resource> <resource> <directory>${basedir}/src/main/resources</directory> </resource> </resources> </build>
2、对项目进行清理编译
还是对maven用的不熟,不然不会这么浪费时间了。