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