类 IgnoreTopLevelConverterNotFoundBindHandler
- java.lang.Object
- org.springframework.boot.context.properties.bind.AbstractBindHandler
- org.springframework.boot.context.properties.bind.handler.IgnoreTopLevelConverterNotFoundBindHandler
- 所有已实现的接口:
BindHandler
public class IgnoreTopLevelConverterNotFoundBindHandler extends AbstractBindHandler
BindHandler
that can be used to ignore top-levelConverterNotFoundException
s.- 从以下版本开始:
- 2.0.1
字段概要
从接口继承的字段 org.springframework.boot.context.properties.bind.BindHandler
DEFAULT
构造器概要
构造器 构造器 说明 IgnoreTopLevelConverterNotFoundBindHandler()
Create a newIgnoreTopLevelConverterNotFoundBindHandler
instance.IgnoreTopLevelConverterNotFoundBindHandler(BindHandler parent)
Create a newIgnoreTopLevelConverterNotFoundBindHandler
instance with a specific parent.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Object
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)
calls).从类继承的方法 org.springframework.boot.context.properties.bind.AbstractBindHandler
onFinish, onStart, onSuccess
构造器详细资料
IgnoreTopLevelConverterNotFoundBindHandler
public IgnoreTopLevelConverterNotFoundBindHandler()
Create a newIgnoreTopLevelConverterNotFoundBindHandler
instance.
IgnoreTopLevelConverterNotFoundBindHandler
public IgnoreTopLevelConverterNotFoundBindHandler(BindHandler parent)
Create a newIgnoreTopLevelConverterNotFoundBindHandler
instance with a specific parent.- 参数:
parent
- the parent handler
方法详细资料
onFailure
public Object onFailure(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Exception error) throws Exception
从接口复制的说明:BindHandler
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)
calls). Implementations may choose to swallow exceptions and return an alternative result.- 指定者:
onFailure
在接口中BindHandler
- 覆盖:
onFailure
在类中AbstractBindHandler
- 参数:
name
- the name of the element being boundtarget
- the item being boundcontext
- the bind contexterror
- the cause of the error (if the exception stands it may be re-thrown)- 返回:
- the actual result that should be used (may be
null
). - 抛出:
Exception
- if the binding isn't valid