接口的使用
org.springframework.boot.context.properties.bind.BindHandler
使用BindHandler的程序包
程序包
说明
Support for external configuration properties.
Support for
@ConfigurationProperties
binding.General
BindHandler
implementations.Binding validation support.
-
org.springframework.boot.context.properties中BindHandler的使用
修饰符和类型方法说明ConfigurationPropertiesBindHandlerAdvisor.apply
(BindHandler bindHandler) Apply additional functionality to the source bind handler.修饰符和类型方法说明ConfigurationPropertiesBindHandlerAdvisor.apply
(BindHandler bindHandler) Apply additional functionality to the source bind handler. -
org.springframework.boot.context.properties.bind中BindHandler的使用
修饰符和类型类说明class
Abstract base class forBindHandler
implementations.class
BindHandler
that can be used to track bound configuration properties.修饰符和类型方法说明<T> BindResult
<T> Binder.bind
(String name, Bindable<T> target, BindHandler handler) Bind the specified targetBindable
using this binder'sproperty sources
.<T> BindResult
<T> Binder.bind
(ConfigurationPropertyName name, Bindable<T> target, BindHandler handler) Bind the specified targetBindable
using this binder'sproperty sources
.<T> T
Binder.bindOrCreate
(String name, Bindable<T> target, BindHandler handler) Bind the specified targetBindable
using this binder'sproperty sources
or create a new instance using the type of theBindable
if the result of the binding isnull
.<T> T
Binder.bindOrCreate
(ConfigurationPropertyName name, Bindable<T> target, BindHandler handler) Bind the specified targetBindable
using this binder'sproperty sources
or create a new instance using the type of theBindable
if the result of the binding isnull
.static Binder
Binder.get
(Environment environment, BindHandler defaultBindHandler) Create a newBinder
instance from the specified environment.限定符构造器说明AbstractBindHandler
(BindHandler parent) Create a new binding handler instance with a specific parent.Binder
(Iterable<ConfigurationPropertySource> sources, PlaceholdersResolver placeholdersResolver, List<ConversionService> conversionServices, Consumer<PropertyEditorRegistry> propertyEditorInitializer, BindHandler defaultBindHandler, BindConstructorProvider constructorProvider) Create a newBinder
instance for the specified sources.Binder
(Iterable<ConfigurationPropertySource> sources, PlaceholdersResolver placeholdersResolver, ConversionService conversionService, Consumer<PropertyEditorRegistry> propertyEditorInitializer, BindHandler defaultBindHandler) Create a newBinder
instance for the specified sources.Binder
(Iterable<ConfigurationPropertySource> sources, PlaceholdersResolver placeholdersResolver, ConversionService conversionService, Consumer<PropertyEditorRegistry> propertyEditorInitializer, BindHandler defaultBindHandler, BindConstructorProvider constructorProvider) Create a newBinder
instance for the specified sources. -
org.springframework.boot.context.properties.bind.handler中BindHandler的使用
修饰符和类型类说明class
BindHandler
that can be used to ignore binding errors.class
BindHandler
that can be used to ignore top-levelConverterNotFoundException
s.class
BindHandler
to enforce that all configuration properties under the root name have been bound.限定符构造器说明IgnoreErrorsBindHandler
(BindHandler parent) Create a newIgnoreTopLevelConverterNotFoundBindHandler
instance with a specific parent.NoUnboundElementsBindHandler
(BindHandler parent, Function<ConfigurationPropertySource, Boolean> filter) -
org.springframework.boot.context.properties.bind.validation中BindHandler的使用