@RestControllerAdvice
public class InvalidFormatExceptionHandler
Represents the REST controller that handles InvalidFormatException and returns an appropriate HTTP response.
class ConstraintViolationExceptionHandler,
annotationclass ExceptionHandlerpublic InvalidFormatExceptionHandler(@NotNull
ConstraintViolationExceptionHandler constraintViolationExceptionHandler)
Represents the REST controller that handles InvalidFormatException and returns an appropriate HTTP response.
constraintViolationExceptionHandler - specifies the class ConstraintViolationExceptionHandlerclass ConstraintViolationExceptionHandler,
annotationclass ExceptionHandler@ExceptionHandler
@NotNull
public org.springframework.http.ResponseEntity<?> handleInvalidFormatException(@NotNull
com.fasterxml.jackson.databind.exc.InvalidFormatException ex,
@Nullable
java.util.Locale locale)
Handles InvalidFormatException and delegates the response to constraintViolationExceptionHandler.
ex - specifies the InvalidFormatExceptionlocale - specifies the Locale of the Request