接口的使用
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的使用
修饰符和类型类说明classAbstract base class forBindHandlerimplementations.classBindHandlerthat can be used to track bound configuration properties.修饰符和类型方法说明<T> BindResult<T> Binder.bind(String name, Bindable<T> target, BindHandler handler) Bind the specified targetBindableusing this binder'sproperty sources.<T> BindResult<T> Binder.bind(ConfigurationPropertyName name, Bindable<T> target, BindHandler handler) Bind the specified targetBindableusing this binder'sproperty sources.<T> TBinder.bindOrCreate(String name, Bindable<T> target, BindHandler handler) Bind the specified targetBindableusing this binder'sproperty sourcesor create a new instance using the type of theBindableif the result of the binding isnull.<T> TBinder.bindOrCreate(ConfigurationPropertyName name, Bindable<T> target, BindHandler handler) Bind the specified targetBindableusing this binder'sproperty sourcesor create a new instance using the type of theBindableif the result of the binding isnull.static BinderBinder.get(Environment environment, BindHandler defaultBindHandler) Create a newBinderinstance 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 newBinderinstance for the specified sources.Binder(Iterable<ConfigurationPropertySource> sources, PlaceholdersResolver placeholdersResolver, ConversionService conversionService, Consumer<PropertyEditorRegistry> propertyEditorInitializer, BindHandler defaultBindHandler) Create a newBinderinstance for the specified sources.Binder(Iterable<ConfigurationPropertySource> sources, PlaceholdersResolver placeholdersResolver, ConversionService conversionService, Consumer<PropertyEditorRegistry> propertyEditorInitializer, BindHandler defaultBindHandler, BindConstructorProvider constructorProvider) Create a newBinderinstance for the specified sources. -
org.springframework.boot.context.properties.bind.handler中BindHandler的使用
修饰符和类型类说明classBindHandlerthat can be used to ignore binding errors.classBindHandlerthat can be used to ignore top-levelConverterNotFoundExceptions.classBindHandlerto enforce that all configuration properties under the root name have been bound.限定符构造器说明IgnoreErrorsBindHandler(BindHandler parent) Create a newIgnoreTopLevelConverterNotFoundBindHandlerinstance with a specific parent.NoUnboundElementsBindHandler(BindHandler parent, Function<ConfigurationPropertySource, Boolean> filter) -
org.springframework.boot.context.properties.bind.validation中BindHandler的使用