Only use Converters which are @ConfigurationPropertiesBinder qualified
Users sometimes create beans of type Converter and don't expect that to automatically trigger a cascade of early initialization. This change adds a qualifier to the Converters that are used by @ConfigurationProperties, so they can be isolated (and simple). Fixes gh-2669
This commit is contained in:
@@ -761,7 +761,8 @@ The following properties names can all be used:
|
||||
Spring will attempt to coerce the external application properties to the right type when
|
||||
it binds to the `@ConfigurationProperties` beans. If you need custom type conversion you
|
||||
can provide a `ConversionService` bean (with bean id `conversionService`) or custom
|
||||
property editors (via a `CustomEditorConfigurer` bean).
|
||||
property editors (via a `CustomEditorConfigurer` bean) or custom `Converters` (with
|
||||
bean definitions annotated as `@ConfigurationPropertiesBinding`).
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user