类的使用
org.springframework.boot.context.properties.source.ConfigurationPropertyName
程序包
说明
External configuration support allowing 'application.properties' to be loaded and used
within a Spring Boot application.
Support for external configuration properties.
Support for
@ConfigurationProperties
binding.General
BindHandler
implementations.Binding validation support.
Sources for external configuration properties.
-
org.springframework.boot.context.config中ConfigurationPropertyName的使用
修饰符和类型方法说明InvalidConfigDataPropertyException.getReplacement()
Return the replacement property that should be used instead ornull
if not replacement is available. -
org.springframework.boot.context.properties中ConfigurationPropertyName的使用
修饰符和类型方法说明BoundConfigurationProperties.get
(ConfigurationPropertyName name) Get the configuration property bound to the given name. -
org.springframework.boot.context.properties.bind中ConfigurationPropertyName的使用
修饰符和类型方法说明<T> BindResult
<T> Binder.bind
(ConfigurationPropertyName name, Bindable<T> target) 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
(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
.default Object
BindHandler.onCreate
(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Object result) Called when binding of an element ends with an unbound result and a newly created instance is about to be returned.AbstractBindHandler.onFailure
(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Exception error) default Object
BindHandler.onFailure
(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Exception error) Called when binding fails for any reason (including failures fromBindHandler.onSuccess(org.springframework.boot.context.properties.source.ConfigurationPropertyName, org.springframework.boot.context.properties.bind.Bindable<?>, org.springframework.boot.context.properties.bind.BindContext, java.lang.Object)
orBindHandler.onCreate(org.springframework.boot.context.properties.source.ConfigurationPropertyName, org.springframework.boot.context.properties.bind.Bindable<?>, org.springframework.boot.context.properties.bind.BindContext, java.lang.Object)
calls).void
AbstractBindHandler.onFinish
(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Object result) default void
BindHandler.onFinish
(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Object result) Called when binding finishes with either bound or unbound result.<T> Bindable
<T> AbstractBindHandler.onStart
(ConfigurationPropertyName name, Bindable<T> target, BindContext context) default <T> Bindable
<T> BindHandler.onStart
(ConfigurationPropertyName name, Bindable<T> target, BindContext context) Called when binding of an element starts but before any result has been determined.AbstractBindHandler.onSuccess
(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Object result) default Object
BindHandler.onSuccess
(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Object result) Called when binding of an element ends with a successful result.BoundPropertiesTrackingBindHandler.onSuccess
(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Object result) -
org.springframework.boot.context.properties.bind.handler中ConfigurationPropertyName的使用
修饰符和类型方法说明IgnoreErrorsBindHandler.onFailure
(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Exception error) IgnoreTopLevelConverterNotFoundBindHandler.onFailure
(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Exception error) NoUnboundElementsBindHandler.onFailure
(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Exception error) void
NoUnboundElementsBindHandler.onFinish
(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Object result) <T> Bindable
<T> NoUnboundElementsBindHandler.onStart
(ConfigurationPropertyName name, Bindable<T> target, BindContext context) NoUnboundElementsBindHandler.onSuccess
(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Object result) -
org.springframework.boot.context.properties.bind.validation中ConfigurationPropertyName的使用
修饰符和类型方法说明ValidationBindHandler.onFailure
(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Exception error) void
ValidationBindHandler.onFinish
(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Object result) <T> Bindable
<T> ValidationBindHandler.onStart
(ConfigurationPropertyName name, Bindable<T> target, BindContext context) ValidationBindHandler.onSuccess
(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Object result) -
org.springframework.boot.context.properties.source中ConfigurationPropertyName的使用
修饰符和类型字段说明static final ConfigurationPropertyName
ConfigurationPropertyName.EMPTY
An emptyConfigurationPropertyName
.修饰符和类型方法说明static ConfigurationPropertyName
ConfigurationPropertyName.adapt
(CharSequence name, char separator) Create aConfigurationPropertyName
by adapting the given source.Create a newConfigurationPropertyName
by appending the given suffix.ConfigurationPropertyName.append
(ConfigurationPropertyName suffix) Create a newConfigurationPropertyName
by appending the given suffix.ConfigurationPropertyName.chop
(int size) Return a newConfigurationPropertyName
by chopping this name to the givensize
.ConfigurationProperty.getName()
Return the name of the configuration property.ConfigurationPropertyNameAliases.getNameForAlias
(ConfigurationPropertyName alias) ConfigurationPropertyName.getParent()
Return the parent of thisConfigurationPropertyName
orEMPTY
if there is no parent.static ConfigurationPropertyName
ConfigurationPropertyName.of
(CharSequence name) Return aConfigurationPropertyName
for the specified string.static ConfigurationPropertyName
ConfigurationPropertyName.ofIfValid
(CharSequence name) Return aConfigurationPropertyName
for the specified string ornull
if the name is not valid.ConfigurationPropertyName.subName
(int offset) Return a newConfigurationPropertyName
by based on this name offset by specific element index.修饰符和类型方法说明ConfigurationPropertyNameAliases.getAliases
(ConfigurationPropertyName name) ConfigurationPropertyNameAliases.iterator()
default Iterator
<ConfigurationPropertyName> IterableConfigurationPropertySource.iterator()
Return an iterator for thenames
managed by this source.MapConfigurationPropertySource.iterator()
IterableConfigurationPropertySource.stream()
Returns a sequentialStream
for thenames
managed by this source.MapConfigurationPropertySource.stream()
修饰符和类型方法说明void
ConfigurationPropertyNameAliases.addAliases
(ConfigurationPropertyName name, ConfigurationPropertyName... aliases) ConfigurationPropertyName.append
(ConfigurationPropertyName suffix) Create a newConfigurationPropertyName
by appending the given suffix.int
ConfigurationPropertyName.compareTo
(ConfigurationPropertyName other) default ConfigurationPropertyState
ConfigurationPropertySource.containsDescendantOf
(ConfigurationPropertyName name) Returns if the source contains any descendants of the specified name.default ConfigurationPropertyState
IterableConfigurationPropertySource.containsDescendantOf
(ConfigurationPropertyName name) ConfigurationPropertyNameAliases.getAliases
(ConfigurationPropertyName name) ConfigurationPropertySource.getConfigurationProperty
(ConfigurationPropertyName name) Return a singleConfigurationProperty
from the source ornull
if no property can be found.MapConfigurationPropertySource.getConfigurationProperty
(ConfigurationPropertyName name) ConfigurationPropertyNameAliases.getNameForAlias
(ConfigurationPropertyName alias) boolean
ConfigurationPropertyName.isAncestorOf
(ConfigurationPropertyName name) Returnstrue
if this element is an ancestor (immediate or nested parent) of the specified name.boolean
ConfigurationPropertyName.isParentOf
(ConfigurationPropertyName name) Returnstrue
if this element is an immediate parent of the specified name.修饰符和类型方法说明default ConfigurationPropertySource
ConfigurationPropertySource.filter
(Predicate<ConfigurationPropertyName> filter) Return a filtered variant of this source, containing only names that match the givenPredicate
.IterableConfigurationPropertySource.filter
(Predicate<ConfigurationPropertyName> filter) 限定符构造器说明ConfigurationProperty
(ConfigurationPropertyName name, Object value, Origin origin) ConfigurationPropertyNameAliases
(ConfigurationPropertyName name, ConfigurationPropertyName... aliases)