Is there anyway to map Spring exceptions (eg. JpaObjectRetrievalFailureException) to REST status code without using a controller specific @ExceptionHandler? I would like to configure that system wide.
Is there anyway to map Spring exceptions (eg. JpaObjectRetrievalFailureException ) to REST status code
Share
You can implement a HandlerExceptionResolver to catch specific exception types. Another possible strategy is to use a generic or abstract DAO class which implements the
@ExceptionHandlerhandlers.