Package com.wilfredmorgan.api.handlers
Class RestExceptionHandler
- java.lang.Object
-
- org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-
- com.wilfredmorgan.api.handlers.RestExceptionHandler
-
@Order(-2147483648) @RestControllerAdvice public class RestExceptionHandler extends org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-
-
Constructor Summary
Constructors Constructor Description RestExceptionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.http.ResponseEntity<java.lang.Object>handleExceptionInternal(java.lang.Exception ex, java.lang.Object body, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus status, org.springframework.web.context.request.WebRequest request)org.springframework.http.ResponseEntity<?>handleResourceFoundException(ResourceFoundException rfe)org.springframework.http.ResponseEntity<?>handleResourceNotFoundException(ResourceNotFoundException rnfe)-
Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
handleAsyncRequestTimeoutException, handleBindException, handleConversionNotSupported, handleException, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpMessageNotReadable, handleHttpMessageNotWritable, handleHttpRequestMethodNotSupported, handleMethodArgumentNotValid, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPart, handleNoHandlerFoundException, handleServletRequestBindingException, handleTypeMismatch
-
-
-
-
Method Detail
-
handleExceptionInternal
protected org.springframework.http.ResponseEntity<java.lang.Object> handleExceptionInternal(java.lang.Exception ex, java.lang.Object body, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus status, org.springframework.web.context.request.WebRequest request)- Overrides:
handleExceptionInternalin classorg.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-
handleResourceNotFoundException
@ExceptionHandler(ResourceNotFoundException.class) public org.springframework.http.ResponseEntity<?> handleResourceNotFoundException(ResourceNotFoundException rnfe)
-
handleResourceFoundException
@ExceptionHandler(ResourceFoundException.class) public org.springframework.http.ResponseEntity<?> handleResourceFoundException(ResourceFoundException rfe)
-
-