-
- All Implemented Interfaces:
-
org.springframework.beans.factory.Aware,org.springframework.context.MessageSourceAware
@Order(value = 1)@ControllerAdvice() public final class ApiErrorHandler extends ResponseEntityExceptionHandler
-
-
Field Summary
Fields Modifier and Type Field Description private MessageSourcemessageSource
-
Constructor Summary
Constructors Constructor Description ApiErrorHandler()
-
Method Summary
Modifier and Type Method Description final ResponseEntity<Object>handleHttpMessageNotReadable(HttpMessageNotReadableException ex, HttpHeaders headers, HttpStatus status, WebRequest request)final ResponseEntity<Object>handleFormValidationException(FormValidationException ex)final ResponseEntity<Object>handleResponseStatus(ResponseStatusException ex)-
-
Method Detail
-
handleHttpMessageNotReadable
final ResponseEntity<Object> handleHttpMessageNotReadable(HttpMessageNotReadableException ex, HttpHeaders headers, HttpStatus status, WebRequest request)
-
handleFormValidationException
@ExceptionHandler(value = {FormValidationException.class}) final ResponseEntity<Object> handleFormValidationException(FormValidationException ex)
-
handleResponseStatus
@ExceptionHandler(value = {ResponseStatusException.class}) final ResponseEntity<Object> handleResponseStatus(ResponseStatusException ex)
-
-
-
-