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

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.

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

No branches or pull requests

2 participants