Description:
Lets say there is a profile baz
.
classpath:application-baz
(local to jar) is overriding application-baz
from spring cloud config repository, which is incorrect.
i.e., values from jar local property source gets precedence over the spring cloud config repo's property source.
Test case illustrating the issue: https://github.com/spring-cloud/spring-cloud-config/pull/1839 --> This PR has the test case in it .
See open issue on spring cloud board: https://github.com/spring-cloud/spring-cloud-config/issues/1838
Spring cloud has suggested the bug to be logged under spring boot.
The workaround we have been applying is
- remove spring.config.import
from application's src/main/resources/application.yml
- set spring.config.import
as JAVA_OPTS
when starting the service.
Comment From: philwebb
Thanks for reporting the issue, this particular use-case was overlooked when we designed the new ConfigData
data support. I've pushed something that I hope will allow Spring Cloud to support profile specific imports.
Comment From: maggmanu77
Thank you @philwebb for taking care of this.