注意:maven打包丢失非java1文件
当我们在使用Maven的时候,常常会因为Maven会导致一些文件编译后没有放进相应的包中,这时候我们应该去找下在pom文件中有没有这几句代码
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
注意:非java文件最好放到resource中较为好