Spring 如何为具有多个and、OR和NOT的不同阶段定义弹簧配置文件?

Spring 如何为具有多个and、OR和NOT的不同阶段定义弹簧配置文件?,spring,spring-boot,yaml,spring-properties,Spring,Spring Boot,Yaml,Spring Properties,我有三个阶段-阶段开发、阶段qa、阶段直播, 三个数据中心--dc1、dc2、dc3和三个品牌--brand1、brand2、brand3 我创建了三个不同的属性文件-application-stage-dev.yml、application-stage-qa.yml和application-stage-live.yml,并将相关属性放入其中 例如: #common live properties here spring: profiles: stage-live #brand1 sp

我有三个阶段-
阶段开发、阶段qa、阶段直播
, 三个数据中心--
dc1、dc2、dc3
和三个品牌--
brand1、brand2、brand3

我创建了三个不同的属性文件-
application-stage-dev.yml、application-stage-qa.yml
application-stage-live.yml
,并将相关属性放入其中

例如:

#common live properties here
spring:
   profiles: stage-live 

#brand1 specific live properties here
spring:
   profiles: stage-live, brand1
如果我想定义一些特定的配置文件定义(例如
stage live&dc1&!brand
(stage dev | stage qa)&brand1
),则应用程序不会加载正确的属性。但是,如果我在
application.yml
文件中执行相同的定义,将所有属性放在一起,它就可以正常工作

如何将特性分离为不同的yaml文件(基于阶段)并定义混合的配置文件定义