Skip to content
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

spring.profiles.include must be a comma separated value in contrast to to non-cloud usage #1417

Open
elmuerte opened this issue Nov 8, 2024 · 0 comments · May be fixed by #1464
Open

spring.profiles.include must be a comma separated value in contrast to to non-cloud usage #1417

elmuerte opened this issue Nov 8, 2024 · 0 comments · May be fixed by #1464

Comments

@elmuerte
Copy link

elmuerte commented Nov 8, 2024

Describe the bug
According to the documentation for spring.profiles.include the value for spring.profiles.include is a list.

spring.profiles.include[0]=common
spring.profiles.include[1]=local

But using this in a configuration file provided via cloud config it does not work. Instead it expects the value to be a comma separated string value:

spring.profiles.include=common,local

The offending code:

https://github.com/spring-cloud/spring-cloud-commons/blob/main/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.java#L306-L317

In Spring Boot the configuration setting is processed as a string list:

https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataEnvironment.java#L291-L310

The difference in behavior is not documented anywhere.

quaff added a commit to quaff/spring-cloud-commons that referenced this issue Feb 6, 2025
…eparated value in bootstrapProperties

Fix spring-cloudGH-1417

Signed-off-by: Yanming Zhou <[email protected]>
quaff added a commit to quaff/spring-cloud-commons that referenced this issue Feb 6, 2025
…eparated value in bootstrapProperties

Fix spring-cloudGH-1417

Signed-off-by: Yanming Zhou <[email protected]>
quaff added a commit to quaff/spring-cloud-commons that referenced this issue Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants