@RestControllerAdvice
public class InvalidFormatExceptionHandler
Represents the REST controller that handles InvalidFormatException and returns an appropriate HTTP response.
class ConstraintViolationExceptionHandler,
annotationclass ExceptionHandler| Constructor and Description |
|---|
InvalidFormatExceptionHandler(ConstraintViolationExceptionHandler constraintViolationExceptionHandler)
Represents the REST controller that handles InvalidFormatException and returns an appropriate HTTP response.
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<org.valiktor.springframework.web.payload.UnprocessableEntity> |
handleInvalidFormatException(com.fasterxml.jackson.databind.exc.InvalidFormatException ex,
java.util.Locale locale)
Handle InvalidFormatException and returns 422 (Unprocessable Entity) status code
with a NotNull constraint violation
|
public 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<org.valiktor.springframework.web.payload.UnprocessableEntity> handleInvalidFormatException(@NotNull
com.fasterxml.jackson.databind.exc.InvalidFormatException ex,
@Nullable
java.util.Locale locale)
Handle InvalidFormatException and returns 422 (Unprocessable Entity) status code with a NotNull constraint violation
ex - specifies the InvalidFormatExceptionlocale - specifies the Locale of the Request