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 place-holders
        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 place-holders
        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).

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