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

Create new ConfigurationProperties Binder #8868

Closed
philwebb opened this issue Apr 7, 2017 · 4 comments
Closed

Create new ConfigurationProperties Binder #8868

philwebb opened this issue Apr 7, 2017 · 4 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@philwebb
Copy link
Member

philwebb commented Apr 7, 2017

A general placeholder for the new configuration properties binder work.

@philwebb philwebb added this to the 2.0.0.M1 milestone Apr 7, 2017
@mbhave
Copy link
Contributor

mbhave commented Apr 7, 2017

  • _ in system env should not map to empty prefix (MB)
  • Nested validation with @NotNull (MB)
  • No setter for ResourceServerProperties clientId (MB)
  • Exception, error messages and failure analyzer (MB) - can be improved
  • String to Resource conversion (also look at String to Class conversion e.g. CacheAutoConfigurationTests) (PW)
  • Map Binder key values should be preserved (PW)
  • HikariDataSourceConfigurationTests.testDataSourceGenericPropertiesOverridden (PW) - fixed by mapbinder key preservation
  • XADataSourceAutoConfigurationTests.createFromClass (PW) - fixed by mapbinder key preservation
  • Map<String,Object> recursive binding foo.map.baz in the old version created nested maps.
  • Multiple case setters (setUrl and setURL in JDBCCommonDataSource XADataSourceAutoConfigurationTests)
  • AliasFor
  • Add Unit Test for Inconsistent binding from environment varaibles to maps #8902
  • Fix BindFailureAnalyzer to deal with other failures

@philwebb
Copy link
Member Author

philwebb commented Apr 7, 2017

The String -> Resource conversion was previously handled by ResourceEditor. We need to consider if we should support PropertyEditorRegistry and BeanUtils.findEditorByConvention(requiredType)

@mbhave
Copy link
Contributor

mbhave commented Apr 10, 2017

Nested properties will only be validated if there is a bound value or they have an @Valid annotation.

@snicoll
Copy link
Member

snicoll commented Apr 12, 2017

Wondering if #6911 can be fixed differently with the new implementation.

philwebb added a commit to philwebb/spring-boot that referenced this issue Apr 25, 2017
Create a new `Binder` class specifically designed to bind properties
from one or more `ConfigurationPropertySources` to an object.

The binder provides a replacement for `RelaxedBinder` and attempts to
fix the limitations of the previous solution.

Closes spring-projectsgh-8868
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants