public class IgnoreErrorsBindHandler extends AbstractBindHandler
BindHandler that can be used to ignore binding errors.DEFAULT| Constructor and Description |
|---|
IgnoreErrorsBindHandler() |
IgnoreErrorsBindHandler(BindHandler parent) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
onFailure(ConfigurationPropertyName name,
Bindable<?> target,
BindContext context,
java.lang.Exception error)
Called when binding fails for any reason (including failures from
BindHandler.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) or BindHandler.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). |
onFinish, onStart, onSuccessclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonCreatepublic IgnoreErrorsBindHandler()
public IgnoreErrorsBindHandler(BindHandler parent)
public java.lang.Object onFailure(ConfigurationPropertyName name, Bindable<?> target, BindContext context, java.lang.Exception error) throws java.lang.Exception
BindHandlerBindHandler.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) or BindHandler.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). Implementations may choose to
swallow exceptions and return an alternative result.onFailure in interface BindHandleronFailure in class AbstractBindHandlername - 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)null).java.lang.Exception - if the binding isn't valid