I have 2 profiles ci and development which both set a prop db. I wonder which values "win" in the new Spring Boot 2.4 config handling when using a ci group like this:
spring.profiles.group.ci[0]: development
---
spring:
config.activate.on-profile: development
db: a
---
spring:
config.activate.on-profile: ci
db: b
Question 1
If the environment sets the active profile to ci, which db value would be used? The value defined in ci or the one in development?
Question 2
Does it behave differently from question 1 if the environment sets active profiles explicitly to development, ci or ci, development?
Background
We are trying to migrate from profiles.include: ... to the new spring.profiles.group.* configuration. Formerly, we had the 'includestatement in theciprofile to include thedevelopment. However, by this itself the developmentvariables would override the ones inci- which to my perception is unexpected. Hence, we needed to specifyspring.active.profiles=development,cito let the values incioverride the ones indevelopment`. As far as I understood the changes in 2.4. are meant to address this unexpected behavior, but we still do not clearly see how things should behave and how the new config options should be used.