Skip to content

Multi-profile YAML documents are not used when put in other than default profile #4132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Oct 9, 2015 · 2 comments
Closed
Milestone

Comments

@ghost
Copy link

ghost commented Oct 9, 2015

We have usecase where we want to use different configurations for some servers, but all of them are 'test' instances ( we have 3 eureka servers and all of them should register to each other). So we are using application-test.yml file with "Multi-profile YAML documents"

---
spring:
  profiles: profile1
  specificProperty: one

---
spring:
  profiles: profile2
  specificProperty: two

Having this in place I was sure it will be possible to load run app on specific server with -Dspring.profiles.active=test,profile1 and on other one with -Dspring.profiles.active=test,profile2 and correct 'specificProperty' will be used. This is not a case - seems that "Multi-profile YAML documents" works only when put in the main application.yml file.

@shakuzen
Copy link
Member

@philwebb I don't see this issue tagged to a milestone, but it looks like the commit was against master. Should this fix/enhancement also be included in 1.2.7?

@philwebb
Copy link
Member

I was just waiting for build 3246 to finish before asking for feedback. I'd rather not change this logic in 1.2.x in case it causes regressions.

@michalkarolik Can you try 1.3.0.BUILD-SNAPSHOT to see if it fixes your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants