From e04ca3d6714e6ff7a81cfc2994f3588c8188dd95 Mon Sep 17 00:00:00 2001 From: Sviatoslav Hryb Date: Tue, 15 Jun 2021 18:06:53 +0300 Subject: [PATCH] Improve RequestPartMethodArgumentResolver Javadoc Closes gh-27043 --- .../method/annotation/RequestPartMethodArgumentResolver.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolver.java index 639dee3cc22..e8720cfbf6b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolver.java @@ -58,8 +58,9 @@ import org.springframework.web.multipart.support.RequestPartServletServerHttpReq * it is derived from the name of the method argument. * *

Automatic validation may be applied if the argument is annotated with - * {@code @javax.validation.Valid}. In case of validation failure, a {@link MethodArgumentNotValidException} - * is raised and a 400 response status code returned if + * {@code @javax.validation.Valid}, Spring's {@link org.springframework.validation.annotation.Validated} + * or custom annotations whose name starts with "Valid". In case of validation failure, + * a {@link MethodArgumentNotValidException} is raised and a 400 response status code returned if * {@link org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver} is configured. * * @author Rossen Stoyanchev