@RestControllerAdvice
public class ConstraintViolationExceptionHandler
Represents the REST controller that handles ConstraintViolationException and returns an appropriate HTTP response.
annotationclass ExceptionHandlerpublic ConstraintViolationExceptionHandler(@NotNull
ValiktorExceptionHandler<?> handler)
Represents the REST controller that handles ConstraintViolationException and returns an appropriate HTTP response.
handler - specifies the interface ValiktorExceptionHandlerannotationclass ExceptionHandler@ExceptionHandler
@NotNull
public org.springframework.http.ResponseEntity<?> handleConstraintViolationException(@NotNull
org.valiktor.ConstraintViolationException ex,
@Nullable
java.util.Locale locale)
Handles ConstraintViolationException and returns and delegates the response to handler.
ex - specifies the ConstraintViolationExceptionlocale - specifies the Locale of the Request