使用idea build项目时,target没有配置文件 即yml文件
在项目pom文件中添加
<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>**/*.xml</include>
<include>**/*.yml</include>
<include>**/*.vm</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
这样即可!