spring-projects / spring-projects/spring-boot
Allow application properties to be contributed from module jars
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 81.5k
- Forks
- 42.7k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 65
Description
Currently application.properties and application.yaml files are loaded from the classpath and the first match wins. This makes it hard to bundle common properties into jar files. It would be nice if we could find a way for jars to also contribute properties without needing to implement a EnvironmentPostProcessor.
There are a few things we need to be careful of:
- What order to we load the resources and how do we make sure a developer can override a contributed value
- We don't want to increase startup time (for example by doing a full classpath search)
- We can't break back-compatibility
- We need to be mindful of
spring.config.import=classpath:
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 by tracing how application.properties and application.yaml are currently loaded from the classpath, then review EnvironmentPostProcessor and spring.config.import=classpath: behavior. Define a design that establishes contribution and override order, avoids a full classpath search, and preserves backward compatibility without increasing startup time.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100