pom.xml文件的filter标签值是src/main/filters/${env}.properties
但此pom.xml中有四个env标签,系统怎么知道用的是哪个env的值?
mvn clean install -P dev mvn命令后面可以加-P 参数指定具体环境,注意P要大写
<!-- 本地开发环境 -->
dev
dev
true
profile里也可以指定默认dev
如果用的idea IDE 右边的maven projects > Profiles里可以勾选需要的环境然后编译
mvn clean install -P dev mvn命令后面可以加-P 参数指定具体环境,注意P要大写
<profile>
<!-- 本地开发环境 -->
<id>dev</id>
<properties>
<profiles.active>dev</profiles.active>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
profile里也可以指定默认dev
如果用的idea IDE 右边的maven projects > Profiles里可以勾选需要的环境然后编译
mvn clean install -P dev mvn后加-P试试