Class GlobalExceptionHandler
java.lang.Object
com.order.api02orderscrud.exception.GlobalExceptionHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String> org.springframework.http.ResponseEntity<String> handlePropertyReferenceException(org.springframework.data.mapping.PropertyReferenceException ex) org.springframework.http.ResponseEntity<String> handleValidationExceptions(org.springframework.web.bind.MethodArgumentNotValidException ex)
-
Constructor Details
-
GlobalExceptionHandler
public GlobalExceptionHandler()
-
-
Method Details
-
handleEntityNotFoundException
@ExceptionHandler(EntityNotFoundException.class) public org.springframework.http.ResponseEntity<String> handleEntityNotFoundException(EntityNotFoundException ex) -
handleValidationExceptions
-
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)
-