org.springframework.boot.context.properties.bind

Class Binder



  • public class Binder
    extends Object
    A container object which Binds objects from one or more ConfigurationPropertySources.
    Since:
    2.0.0
    Author:
    Phillip Webb, Madhura Bhave
    • Constructor Detail

      • Binder

        public Binder(ConfigurationPropertySource... sources)
        Create a new Binder instance for the specified sources. A DefaultFormattingConversionService will be used for all conversion.
        Parameters:
        sources - the sources used for binding
      • Binder

        public Binder(Iterable<ConfigurationPropertySource> sources)
        Create a new Binder instance for the specified sources. A DefaultFormattingConversionService will be used for all conversion.
        Parameters:
        sources - the sources used for binding
      • Binder

        public Binder(Iterable<ConfigurationPropertySource> sources,
                      PlaceholdersResolver placeholdersResolver,
                      org.springframework.core.convert.ConversionService conversionService)
        Create a new Binder instance for the specified sources.
        Parameters:
        sources - the sources used for binding
        placeholdersResolver - strategy to resolve any property placeholders
        conversionService - the conversion service to convert values (or null to use ApplicationConversionService)
      • Binder

        public Binder(Iterable<ConfigurationPropertySource> sources,
                      PlaceholdersResolver placeholdersResolver,
                      org.springframework.core.convert.ConversionService conversionService,
                      Consumer<org.springframework.beans.PropertyEditorRegistry> propertyEditorInitializer)
        Create a new Binder instance for the specified sources.
        Parameters:
        sources - the sources used for binding
        placeholdersResolver - strategy to resolve any property placeholders
        conversionService - the conversion service to convert values (or null to use ApplicationConversionService)
        propertyEditorInitializer - initializer used to configure the property editors that can convert values (or null if no initialization is required). Often used to call ConfigurableBeanFactory.copyRegisteredEditorsTo(org.springframework.beans.PropertyEditorRegistry).
      • Binder

        public Binder(Iterable<ConfigurationPropertySource> sources,
                      PlaceholdersResolver placeholdersResolver,
                      org.springframework.core.convert.ConversionService conversionService,
                      Consumer<org.springframework.beans.PropertyEditorRegistry> propertyEditorInitializer,
                      BindHandler defaultBindHandler)
        Create a new Binder instance for the specified sources.
        Parameters:
        sources - the sources used for binding
        placeholdersResolver - strategy to resolve any property placeholders
        conversionService - the conversion service to convert values (or null to use ApplicationConversionService)
        propertyEditorInitializer - initializer used to configure the property editors that can convert values (or null if no initialization is required). Often used to call ConfigurableBeanFactory.copyRegisteredEditorsTo(org.springframework.beans.PropertyEditorRegistry).
        defaultBindHandler - the default bind handler to use if none is specified when binding
        Since:
        2.2.0
      • Binder

        public Binder(Iterable<ConfigurationPropertySource> sources,
                      PlaceholdersResolver placeholdersResolver,
                      org.springframework.core.convert.ConversionService conversionService,
                      Consumer<org.springframework.beans.PropertyEditorRegistry> propertyEditorInitializer,
                      BindHandler defaultBindHandler,
                      BindConstructorProvider constructorProvider)
        Create a new Binder instance for the specified sources.
        Parameters:
        sources - the sources used for binding
        placeholdersResolver - strategy to resolve any property placeholders
        conversionService - the conversion service to convert values (or null to use ApplicationConversionService)
        propertyEditorInitializer - initializer used to configure the property editors that can convert values (or null if no initialization is required). Often used to call ConfigurableBeanFactory.copyRegisteredEditorsTo(org.springframework.beans.PropertyEditorRegistry).
        defaultBindHandler - the default bind handler to use if none is specified when binding
        constructorProvider - the constructor provider which provides the bind constructor to use when binding
        Since:
        2.2.1

Copyright © 2020 Pivotal Software, Inc.. All rights reserved.