Describe the bug When updating to spring boot 3.2.5 and spring cloud 2023.0.1, we discovered that ordering of property sources was not anymore the same. We are using overrides to "enforce" some configurations shared across multiple microservices. So we are expecting overrides to always have precedence over configuration declared by any microservice.
Since commit https://github.com/spring-cloud/spring-cloud-config/commit/6ec9c432cb2c02840b85fdd8bcd0859eabc0ba46 , the overrides can be overridden by services configuration.
So if we have for example a service with default configuration file and profile 'dev' activated, we used to have this order of property sources:
- overrides
- service-dev.yaml
- service.yaml
- classpath: application.yaml
Now, after the update we have this:
- service-dev.yaml
- service.yaml
- overrides
- classpath: application.yaml
This is quite similar to the problem exposed in this ticket : https://github.com/spring-cloud/spring-cloud-config/issues/2392
The workaround proposed in the ticket works so using bootstrap starter kind of solves the issue. However, we have the feeling that this is not aligned with the documentation.
Comment From: ryanjbaxter
Duplicate of #2417