Skip to content

Create new ConfigurationPropertySource abstraction #4910

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

Closed
philwebb opened this issue Jan 8, 2016 · 0 comments
Closed

Create new ConfigurationPropertySource abstraction #4910

philwebb opened this issue Jan 8, 2016 · 0 comments
Labels
theme: config-data Issues related to the configuration theme type: enhancement A general enhancement
Milestone

Comments

@philwebb
Copy link
Member

philwebb commented Jan 8, 2016

The current rules for relaxed names are hard to describe. We should tighten them in 2.0 and create a new abstraction.

@philwebb philwebb added the type: enhancement A general enhancement label Jan 8, 2016
@philwebb philwebb added this to the 2.0.0.M2 milestone Jan 8, 2016
@philwebb philwebb modified the milestones: 2.0.0.M2, 2.0.0.M1 Aug 30, 2016
@snicoll snicoll self-assigned this Aug 30, 2016
@snicoll snicoll added the theme: config-data Issues related to the configuration theme label Jan 11, 2017
@philwebb philwebb modified the milestones: 2.0.0.M1, 2.0.0 Jan 12, 2017
@snicoll snicoll removed their assignment Feb 1, 2017
@philwebb philwebb changed the title Make relaxed names less relaxed Create new ConfigurationPropertySource abstraction Apr 25, 2017
philwebb added a commit to philwebb/spring-boot that referenced this issue Apr 25, 2017
Add a new abstraction that represents a source for configuration
properties. The new source is similar to the `Environment` abstraction
provided by Spring Framework but follows a stricter set of rules.

The `ConfigurationPropertySource` provides a uniform view onto a source
and will help to move responsibility for accessing properties in a
"relaxed" way away from the caller.

The `ConfigurationPropertyName` class enforces strict naming rules
that callers must follow when accessing properties. Configuration
names are lowercase, dot separated and may contain dashes. In
addition "indexed" name elements may be defined by using square
brackets.

Mapping is provided to existing Spring PropertySources implemented with
the relaxed rules that users are used to. For example the configuration
property `server.local-host` can still be written in a property files
as `server.localHost` or in an environment variable as SERVER_LOCALHOST.

Closes spring-projectsgh-4910
philwebb added a commit to philwebb/spring-boot that referenced this issue Apr 25, 2017
Update `SpringApplication` to automatically attached the
`ConfigurationPropertiesSource` when a `SpringApplication` runs.

See spring-projectsgh-4910
philwebb added a commit to philwebb/spring-boot that referenced this issue Apr 25, 2017
Remove `ConfigurationProperySource` from `PropertySourcesPropertyValues`
so that the deprecated code to continues to work.

See spring-projectsgh-4910
philwebb added a commit that referenced this issue Apr 27, 2017
Update `SpringApplication` to automatically attached the
`ConfigurationPropertiesSource` when a `SpringApplication` runs.

See gh-4910
philwebb added a commit that referenced this issue Apr 27, 2017
Remove `ConfigurationProperySource` from `PropertySourcesPropertyValues`
so that the deprecated code to continues to work.

See gh-4910
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: config-data Issues related to the configuration theme type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants