打war包时无法把src/main/java里的xml文件打包上去
作者:互联网
maven打包默认打src/mian/resource里面的xml,而不会去src/main/java,所以
再pom.xml里的bulid节点里加上
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</resource>
标签:xml,src,main,java,包时,properties,打包 来源: https://www.cnblogs.com/a1304908180/p/10482572.html