Hello Describe the bug As reported here: #367, spring.profiles.include is not managed as expected when adding a profile in a config file that is on spring-cloud-server.
I'm not asking for recursive calls to the config-server as evoked here #1395, I just want to activate the profile.
I know that some people don't like to do that, but I just think that a project working with local config should work with spring-cloud-config without changes, right?
I'll try to provide a detail example, so that you can test:
Sample
- Use this very simple sample project:
https://github.com/BorisNaguet/spring-cloud-config-profile
mvn package
java -Dspring.profiles.active=feat-dev -jar target/springboot-demo-0.0.1-SNAPSHOT.jar
Result is:
The following profiles are active: feat-dev,product
==>> dev-host
==>> from opt profile
-
copy
application-feat-dev.yml
to your config-server -
update
bootstrap.yaml
, to enable spring-config, and set your config server URL -
IMPORTANT: remove/rename the local
application-feat-dev.yml
Result is now:
The following profiles are active: feat-dev
==>> dev-host
The config data if fetched from feat-dev, but it doesn't activate the profiles anymore
Comment From: spencergibb
Can you update to the latest spring boot and spring cloud and try again?
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: BorisNaguet
Hello, Yes that works with the new versions! Thanks