目录
一 单文件yaml版
*二 多文件版yaml
三 多文件版properties
一 单文件yaml版
多环境开发 核心 → 配置文件:1 设置环境 2 应用环境
yaml
#2 应用环境:使用哪个环境
#公共配置(3种环境都不区分的写在这里)
spring:
profiles:
active: pro
#1 设置环境
---
#生产环境
spring:
profiles: pro
server:
port: 88
---
#开发环境
spring:
profiles: dev
server:
port: 80
---
#测试环境
spring:
profiles: test
server:
port: 81
结果
总结
*二 多文件版yaml
三 多文件版properties
备注:properties只支持多文件版本,没有单文件合并的



