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 |
|---|---|
Object |
onFailure(ConfigurationPropertyName name,
Bindable<?> target,
BindContext context,
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) calls). |
onFinish, onStart, onSuccesspublic IgnoreErrorsBindHandler()
public IgnoreErrorsBindHandler(BindHandler parent)
public Object onFailure(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Exception error) throws 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) 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).Exception - if the binding isn't validCopyright © 2019 Pivotal Software, Inc.. All rights reserved.