Add MethodParameter[] input to MethodValidationAdapter
This allows re-use of existing MethodParameter instances from controller methods with cached metadata, and also ensures additional capabilities such as looking up parameter annotations on interfaces. See gh-29825
This commit is contained in:
@@ -152,7 +152,8 @@ public class InvocableHandlerMethod extends HandlerMethod {
|
||||
return getMethodArgumentValues(exchange, bindingContext, providedArgs).flatMap(args -> {
|
||||
Class<?>[] groups = getValidationGroups();
|
||||
if (shouldValidateArguments() && this.methodValidator != null) {
|
||||
this.methodValidator.validateArguments(getBean(), getBridgedMethod(), args, groups);
|
||||
this.methodValidator.validateArguments(
|
||||
getBean(), getBridgedMethod(), getMethodParameters(), args, groups);
|
||||
}
|
||||
Object value;
|
||||
Method method = getBridgedMethod();
|
||||
|
||||
Reference in New Issue
Block a user