yml的配置
server:
#port: 8080
spring:
application:
name: springboot-profile
profiles: #指定执行环境
active: @profiles.active@
pom依赖:
dev
true
<profiles.active>dev</profiles.active>
<profile>
<id>prod</id>
<properties>
<profiles.active>prod</profiles.active>
</properties>
</profile>
<profile>
<id>test</id>
<properties>
<profiles.active>test</profiles.active>
</properties>
</profile>
</profiles>
src/main/resources true **/*.*