Class GlobalExceptionHandler

java.lang.Object
com.order.api02orderscrud.exception.GlobalExceptionHandler

@RestControllerAdvice public class GlobalExceptionHandler extends Object
  • Constructor Details

    • GlobalExceptionHandler

      public GlobalExceptionHandler()
  • Method Details

    • handleEntityNotFoundException

      @ExceptionHandler(EntityNotFoundException.class) public org.springframework.http.ResponseEntity<String> handleEntityNotFoundException(EntityNotFoundException ex)
    • handleValidationExceptions

      @ExceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException.class) public org.springframework.http.ResponseEntity<Map<String,String>> handleValidationExceptions(org.springframework.web.bind.MethodArgumentNotValidException ex)
    • handlePropertyReferenceException

      @ExceptionHandler(org.springframework.data.mapping.PropertyReferenceException.class) public org.springframework.http.ResponseEntity<String> handlePropertyReferenceException(org.springframework.data.mapping.PropertyReferenceException ex)
    • handleRuntimeException

      @ExceptionHandler(java.lang.RuntimeException.class) public org.springframework.http.ResponseEntity<String> handleRuntimeException(RuntimeException ex)