1.拷贝一个application.yml为application-dev.yml和application-prod.yml(生产环境)
application.yml
spring:
profiles:
active: prod
或者
spring:
profiles:
active: dev
application-prod.yml
server:
port: 8080
boy:
hlsBirth: 1992出生
hlsAge: 23
application-dev.yml
server:
port: 8080
boy:
hlsBirth: 1992出生
hlsAge: 23