mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-02 15:29:05 +00:00
Polish
This commit is contained in:
+7
-7
@@ -65,13 +65,6 @@ public class ValidationBindHandler extends AbstractBindHandler {
|
||||
return super.onSuccess(name, target, context, result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Object result)
|
||||
throws Exception {
|
||||
validate(name, target, context, result);
|
||||
super.onFinish(name, target, context, result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object onFailure(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Exception error)
|
||||
throws Exception {
|
||||
@@ -83,6 +76,13 @@ public class ValidationBindHandler extends AbstractBindHandler {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Object result)
|
||||
throws Exception {
|
||||
validate(name, target, context, result);
|
||||
super.onFinish(name, target, context, result);
|
||||
}
|
||||
|
||||
private void validate(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Object result) {
|
||||
Object validationTarget = getValidationTarget(target, context, result);
|
||||
Class<?> validationType = target.getBoxedType().resolve();
|
||||
|
||||
Reference in New Issue
Block a user