Skip to content

Commit df588e0

Browse files
committed
Avoid duplicated documentation of validation annotations
See gh-27042, gh-27043, gh-27050
1 parent b677206 commit df588e0

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

Diff for: spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/AbstractMessageReaderArgumentResolver.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@
5858
* Abstract base class for argument resolvers that resolve method arguments
5959
* by reading the request body with an {@link HttpMessageReader}.
6060
*
61-
* <p>Applies validation if the method argument is annotated with
62-
* {@code @javax.validation.Valid} or
63-
* {@link org.springframework.validation.annotation.Validated}. Validation
64-
* failure results in an {@link ServerWebInputException}.
61+
* <p>Applies validation if the method argument is annotated with any
62+
* {@linkplain org.springframework.validation.annotation.ValidationAnnotationUtils#determineValidationHints
63+
* annotations that trigger validation}. Validation failure results in a
64+
* {@link ServerWebInputException}.
6565
*
6666
* @author Rossen Stoyanchev
6767
* @author Sebastien Deleuze

Diff for: spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolver.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,10 @@
5858
* the part is not specified, the request part's name is derived from the name of
5959
* the method argument.
6060
*
61-
* <p>Automatic validation may be applied if the argument is annotated with
62-
* {@code @javax.validation.Valid}, Spring's {@link org.springframework.validation.annotation.Validated}
63-
* annotation, or a custom annotation whose name starts with "Valid". In case of
64-
* validation failure, a {@link MethodArgumentNotValidException} is raised and a
65-
* 400 response status code returned if the
61+
* <p>Automatic validation may be applied if the argument is annotated with any
62+
* {@linkplain org.springframework.validation.annotation.ValidationAnnotationUtils#determineValidationHints
63+
* annotations that trigger validation}. In case of validation failure, a
64+
* {@link MethodArgumentNotValidException} is raised and a 400 response status code returned if the
6665
* {@link org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver}
6766
* is configured.
6867
*

Diff for: spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessor.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@
5151
* to the body of the request or response with an {@link HttpMessageConverter}.
5252
*
5353
* <p>An {@code @RequestBody} method argument is also validated if it is annotated
54-
* with {@code @javax.validation.Valid}, Spring's {@link org.springframework.validation.annotation.Validated}
55-
* or custom annotations whose name starts with "Valid". In case of validation failure,
54+
* with any
55+
* {@linkplain org.springframework.validation.annotation.ValidationAnnotationUtils#determineValidationHints
56+
* annotations that trigger validation}. In case of validation failure,
5657
* {@link MethodArgumentNotValidException} is raised and results in an HTTP 400
5758
* response status code if {@link DefaultHandlerExceptionResolver} is configured.
5859
*

0 commit comments

Comments
 (0)