yaml多文档模块设置
paalication.yaml 文件下
用 — (三条短横线)分割每一个模块
server:
port: 8081
spring:
profiles:
active: dev
---
server:
port: 8082
spring:
config:
activate:
on-profile: test
---
server:
port: 8083
spring:
config:
activate:
on-profile: dev
文章中的版本为 SpringBoot 2.7.0
> spring:
> profies: test
替换为:
> spring:
> config:
> activate:
> on-profile: test