spring.profiles.active: @profiles.active@
pom.xml
<profiles> <profile> <!-- 开发环境 --> <id>dev</id> <properties> <profiles.active>dev</profiles.active> </properties> <!-- 默认使用开发环境配置 --> <activation> <activeByDefault>true</activeByDefault> </activation> </profile> <profile> <!-- 测试环境 --> <id>test</id> <properties> <profiles.active>test</profiles.active> </properties> </profile> <profile> <!-- 生产环境 --> <id>prod</id> <properties> <profiles.active>prod</profiles.active> </properties> </profile> </profiles>
标签:spring,boot,profiles,active,切换,test,prod From: https://www.cnblogs.com/shuzhixia/p/17490892.html