一、多Profile文件
- 多Profile文件
多Profile文件配置文件名格式:application-{profile}.properties/yml,默认使用application.properties的配置 - 示例.properties格式
在resources文件夹下新建配置文件application-dev.properties
server.port=8082
在resources文件夹下新建配置文件application-prod.properties
server.port=8083
- yml支持多文档块方式,用符号“—”隔开
server:
port: 8082
---
server:
port: 8083
spring