Spring Data Exception Handling
问题 I´m working on a project using Spring Data-JPA. I need to handle some exceptions in JpaRepository method calls. In the code bellow, I need to intercept primary key violations erros but I cannot catch the exception directly. In my case, when an exception of this kind occurs, the UnexpectedRollbackException exception is thrown by repository layer (JpaRepository). I need to search inside this exception object to determine what is the cause of the problem. I am wondering if there is a more