Avoid duplicated documentation of validation annotations

See gh-27042, gh-27043, gh-27050
This commit is contained in:
Sam Brannen
2021-06-15 17:30:41 +02:00
parent b677206159
commit df588e030f
3 changed files with 11 additions and 11 deletions

View File

@@ -58,10 +58,10 @@ import org.springframework.web.server.UnsupportedMediaTypeStatusException;
* Abstract base class for argument resolvers that resolve method arguments * Abstract base class for argument resolvers that resolve method arguments
* by reading the request body with an {@link HttpMessageReader}. * by reading the request body with an {@link HttpMessageReader}.
* *
* <p>Applies validation if the method argument is annotated with * <p>Applies validation if the method argument is annotated with any
* {@code @javax.validation.Valid} or * {@linkplain org.springframework.validation.annotation.ValidationAnnotationUtils#determineValidationHints
* {@link org.springframework.validation.annotation.Validated}. Validation * annotations that trigger validation}. Validation failure results in a
* failure results in an {@link ServerWebInputException}. * {@link ServerWebInputException}.
* *
* @author Rossen Stoyanchev * @author Rossen Stoyanchev
* @author Sebastien Deleuze * @author Sebastien Deleuze

View File

@@ -58,11 +58,10 @@ import org.springframework.web.multipart.support.RequestPartServletServerHttpReq
* the part is not specified, the request part's name is derived from the name of * the part is not specified, the request part's name is derived from the name of
* the method argument. * the method argument.
* *
* <p>Automatic validation may be applied if the argument is annotated with * <p>Automatic validation may be applied if the argument is annotated with any
* {@code @javax.validation.Valid}, Spring's {@link org.springframework.validation.annotation.Validated} * {@linkplain org.springframework.validation.annotation.ValidationAnnotationUtils#determineValidationHints
* annotation, or a custom annotation whose name starts with "Valid". In case of * annotations that trigger validation}. In case of validation failure, a
* validation failure, a {@link MethodArgumentNotValidException} is raised and a * {@link MethodArgumentNotValidException} is raised and a 400 response status code returned if the
* 400 response status code returned if the
* {@link org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver} * {@link org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver}
* is configured. * is configured.
* *

View File

@@ -51,8 +51,9 @@ import org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolv
* to the body of the request or response with an {@link HttpMessageConverter}. * to the body of the request or response with an {@link HttpMessageConverter}.
* *
* <p>An {@code @RequestBody} method argument is also validated if it is annotated * <p>An {@code @RequestBody} method argument is also validated if it is annotated
* with {@code @javax.validation.Valid}, Spring's {@link org.springframework.validation.annotation.Validated} * with any
* or custom annotations whose name starts with "Valid". In case of validation failure, * {@linkplain org.springframework.validation.annotation.ValidationAnnotationUtils#determineValidationHints
* annotations that trigger validation}. In case of validation failure,
* {@link MethodArgumentNotValidException} is raised and results in an HTTP 400 * {@link MethodArgumentNotValidException} is raised and results in an HTTP 400
* response status code if {@link DefaultHandlerExceptionResolver} is configured. * response status code if {@link DefaultHandlerExceptionResolver} is configured.
* *