一、改文件 pom.xml
project标签内下添加
<profiles>
<profile>
<id>dev</id>
<properties>
<test>11aaaaaaaaaaaa22x</test>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
</profiles>
2、再build标签下添加
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
二、引用
/src/main/resources 目录下额文件 @test@ 形式引用。 springboot 把maven默认的${test}形式改成了用@。
maven 针对不同环境打包 springBoot工程
猜你喜欢
转载自wwwz.iteye.com/blog/2397851
今日推荐
周排行