一、环境配置的位置以及优先级
二、多环境切换
application.properties方式:
# springboot的多环境配置,可以选择激活哪一个配置文件
spring.profiles.active = test #-后面的
# 使用application-test.properties配置文件
application.yaml方式:
server:
port: 8081
spring:
profiles:
active: dev
---
server:
port: 8082
spring:
profiles: dev
---
server:
port: 8083
spring:
profiles: test