Class ExceptionAdvice

java.lang.Object
org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
inha.dayoook_e.common.exceptions.ExceptionAdvice
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.MessageSourceAware

@RestControllerAdvice(annotations=org.springframework.web.bind.annotation.RestController.class) public class ExceptionAdvice extends org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
  • Field Summary

    Fields inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler

    logger, PAGE_NOT_FOUND_LOG_CATEGORY, pageNotFoundLogger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.ResponseEntity<Object>
    exception(Exception e, org.springframework.web.context.request.WebRequest request)
     
    org.springframework.http.ResponseEntity<ErrorReasonDTO>
    handleAccessDeniedException(org.springframework.security.access.AccessDeniedException ex)
     
    org.springframework.http.ResponseEntity<Object>
    handleMethodArgumentNotValid(org.springframework.web.bind.MethodArgumentNotValidException ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode status, org.springframework.web.context.request.WebRequest request)
     
    handleMethodArgumentTypeMismatch(org.springframework.web.method.annotation.MethodArgumentTypeMismatchException ex)
     
    handleNullValueInNestedPathException(org.springframework.beans.NullValueInNestedPathException ex)
     
    org.springframework.http.ResponseEntity
    onThrowException(BaseException baseException, jakarta.servlet.http.HttpServletRequest request)
     
    org.springframework.http.ResponseEntity<Object>
    validation(jakarta.validation.ConstraintViolationException e, org.springframework.web.context.request.WebRequest request)
     

    Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler

    createProblemDetail, createResponseEntity, getMessageSource, handleAsyncRequestTimeoutException, handleBindException, handleConversionNotSupported, handleErrorResponseException, handleException, handleExceptionInternal, handleHandlerMethodValidationException, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpMessageNotReadable, handleHttpMessageNotWritable, handleHttpRequestMethodNotSupported, handleMaxUploadSizeExceededException, handleMethodValidationException, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPart, handleNoHandlerFoundException, handleNoResourceFoundException, handleServletRequestBindingException, handleTypeMismatch, setMessageSource

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExceptionAdvice

      public ExceptionAdvice()
  • Method Details

    • handleMethodArgumentTypeMismatch

      @ExceptionHandler(org.springframework.web.method.annotation.MethodArgumentTypeMismatchException.class) @ResponseStatus(BAD_REQUEST) public BaseResponse<Object> handleMethodArgumentTypeMismatch(org.springframework.web.method.annotation.MethodArgumentTypeMismatchException ex)
    • handleNullValueInNestedPathException

      @ExceptionHandler(org.springframework.beans.NullValueInNestedPathException.class) @ResponseStatus(BAD_REQUEST) public BaseResponse<Object> handleNullValueInNestedPathException(org.springframework.beans.NullValueInNestedPathException ex)
    • handleAccessDeniedException

      @ExceptionHandler(org.springframework.security.access.AccessDeniedException.class) public org.springframework.http.ResponseEntity<ErrorReasonDTO> handleAccessDeniedException(org.springframework.security.access.AccessDeniedException ex)
    • validation

      @ExceptionHandler public org.springframework.http.ResponseEntity<Object> validation(jakarta.validation.ConstraintViolationException e, org.springframework.web.context.request.WebRequest request)
    • handleMethodArgumentNotValid

      public org.springframework.http.ResponseEntity<Object> handleMethodArgumentNotValid(org.springframework.web.bind.MethodArgumentNotValidException ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode status, org.springframework.web.context.request.WebRequest request)
      Overrides:
      handleMethodArgumentNotValid in class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
    • exception

      @ExceptionHandler public org.springframework.http.ResponseEntity<Object> exception(Exception e, org.springframework.web.context.request.WebRequest request)
    • onThrowException

      @ExceptionHandler(BaseException.class) public org.springframework.http.ResponseEntity onThrowException(BaseException baseException, jakarta.servlet.http.HttpServletRequest request)