spring-projects / spring-projects/spring-boot

@ConfigurationProperties should have an option to have properties read each time from Environment

Open
#259 22 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

theme: config-data type: enhancement
Dominant language
Java
Stars
81.5k
Forks
42.7k
Avg merge
2d 4h
Merged PRs (30d)
65

Description

Originally raised on the SPR issue tracker:
https://jira.springsource.org/browse/SPR-11289

@ConfigurationProperties objects should have some mechanism for allowing some or all properties to be read from a propertySource on each get invocation. It seems like instead of injected a concrete implementation into the AppContext we should inject a proxy for the Config object which can reference the Environment abstraction.

The usecase for this would be when we have implemented a custom PropertySource which is aware of property changes.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the @ConfigurationProperties and Environment abstractions, then inspect how configuration objects are injected into the application context. Determine how a custom, change-aware PropertySource could be consulted on each getter invocation. Done means a defined option supports dynamic reads for some or all properties without breaking existing behavior.

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
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.