spring-cloud / spring-cloud/spring-cloud-commons
spring.profiles.include must be a comma separated value in contrast to to non-cloud usage
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 751
- Forks
- 744
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
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:
In Spring Boot the configuration setting is processed as a string list:
The difference in behavior is not documented anywhere.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.java at lines 306-317, then compare the list processing in Spring Boot's ConfigDataEnvironment.java at lines 291-310. Verify how indexed and comma-separated spring.profiles.include values are handled for cloud configuration, and ensure the behavior is consistent or clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100