类 NoUnboundElementsBindHandler
- java.lang.Object
- org.springframework.boot.context.properties.bind.AbstractBindHandler
- org.springframework.boot.context.properties.bind.handler.NoUnboundElementsBindHandler
- 所有已实现的接口:
BindHandler
public class NoUnboundElementsBindHandler extends AbstractBindHandler
BindHandler
to enforce that all configuration properties under the root name have been bound.- 从以下版本开始:
- 2.0.0
字段概要
从接口继承的字段 org.springframework.boot.context.properties.bind.BindHandler
DEFAULT
构造器概要
构造器 构造器 说明 NoUnboundElementsBindHandler(BindHandler parent)
NoUnboundElementsBindHandler(BindHandler parent, Function<ConfigurationPropertySource,Boolean> filter)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
onFinish(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Object result)
Called when binding finishes, regardless of whether the property was bound or not.Object
onSuccess(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Object result)
Called when binding of an element ends with a successful result.从类继承的方法 org.springframework.boot.context.properties.bind.AbstractBindHandler
onFailure, onStart
构造器详细资料
NoUnboundElementsBindHandler
public NoUnboundElementsBindHandler(BindHandler parent)
NoUnboundElementsBindHandler
public NoUnboundElementsBindHandler(BindHandler parent, Function<ConfigurationPropertySource,Boolean> filter)
方法详细资料
onSuccess
public Object onSuccess(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Object result)
从接口复制的说明:BindHandler
Called when binding of an element ends with a successful result. Implementations may change the ultimately returned result or perform addition validation.- 指定者:
onSuccess
在接口中BindHandler
- 覆盖:
onSuccess
在类中AbstractBindHandler
- 参数:
name
- the name of the element being boundtarget
- the item being boundcontext
- the bind contextresult
- the bound result (nevernull
)- 返回:
- the actual result that should be used (may be
null
)
onFinish
public void onFinish(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Object result) throws Exception
从接口复制的说明:BindHandler
Called when binding finishes, regardless of whether the property was bound or not.- 指定者:
onFinish
在接口中BindHandler
- 覆盖:
onFinish
在类中AbstractBindHandler
- 参数:
name
- the name of the element being boundtarget
- the item being boundcontext
- the bind contextresult
- the bound result (may benull
)- 抛出:
Exception
- if the binding isn't valid