You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have observed that starting from spring boot 2.0.2, its giving higher priority to included profiles over active profile.
I am aware about #13151 but that did not fix the issue I am running into.
I my case I have a bootstrap.yml file which pulls configurations from config server. The bootstrap.yml file also defines "spring.profiles.include" to include profiles. To activate a profile I am passing "spring.profiles.active" as jvm startup argument.
I am attaching a sample project to demonstrate the issue, for simplicity I did not specify spring cloud config sever properties and reading both bootstrap.yml & application.yml from classpath.
mbhave
changed the title
Different profile precedence introduced in Spring Boot 2.0.2 & 2.0.3 when including profile through bootstrap.yml
Profiles from include profile property take precedence over active profile property
Jun 19, 2018
@philwebb, @mbhave I still see similar issue when using config server and loading external github properties. Created #13965 with details and a sample project to replicate it.
Hi
I have observed that starting from spring boot 2.0.2, its giving higher priority to included profiles over active profile.
I am aware about #13151 but that did not fix the issue I am running into.
I my case I have a bootstrap.yml file which pulls configurations from config server. The bootstrap.yml file also defines "spring.profiles.include" to include profiles. To activate a profile I am passing "spring.profiles.active" as jvm startup argument.
I am attaching a sample project to demonstrate the issue, for simplicity I did not specify spring cloud config sever properties and reading both bootstrap.yml & application.yml from classpath.
I have used a command line runner to log this property on console and using
bootRun
which also set-Dspring.profiles.active=development
.With Spring boot 2.0.1 & Finchley.RC1:
a_sample_key: dev_feature_value // Which is what I expect, its giving me the property from active profile
With Spring boot 2.0.3 & Finchley.RC2:
a_sample_key: shared_feature_value // Which is not correct, its returning me value from included profile
profiledemo.zip
The text was updated successfully, but these errors were encountered: