Skip to content

Remove unused and misleading setters on ConfigurationPropertiesBindingPostProcessor #10598

@wilkinsona

Description

@wilkinsona

ConfigurationPropertiesBindingPostProcessor currently has a number of setter methods that aren't used by Boot itself and that provide misleading indications of its capabilities. For example, setPropertySources(Iterable<PropertySource> suggests that the property sources can be set at any time. This, however, is not the case as calling the setter will only have an effect up until afterPropertiesSet is called.

The following setter methods should be removed to more accurately reflect the post-processor's capabilities and intended usage:

  • setOrder(int)
  • setPropertySources(Iterable<PropertySource>
  • setValidator(Validator)
  • setConversionService(ConversionService)

To give time for adaptation to these changes this issue will deprecate the setters and a separate issue will remove them prior to Boot 2.0 reaching the release candidate phase. See #10460 for a related issue where we're now moving towards Spring Cloud leaving ConfigurationPropertiesBindingPostProcessor alone and using a slightly enhanced ConfigurationPropertiesBinder and its own @RefreshableConfigurationProperties annotation instead.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions