title: @ExceptionHandler does not work for specific hibernate exception
body: <p>I am trying to catch some <em>internal</em> exceptions and then prompt the end-users with nicer messages. But when it comes to this exception: </p>
  
  <blockquote>
    <p>Exception StackTrace</p>
  </blockquote>
  
  <pre><code>08/May/2018:20:39:09.947 +0800 ERROR o.h.e.j.spi.SqlExceptionHelper [] ERROR: update or delete on table "alert_rule" violates foreign key constraint "alert_alert_rule_id_fkey" on table "alert"
    Detail: Key (id)=(58) is still referenced from table "alert".
  08/May/2018:20:39:09.977 +0800 ERROR o.a.c.c.C.[.[.[.[dispatcherServlet] [] Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [alert_alert_rule_id_fkey]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement] with root cause
  org.postgresql.util.PSQLException: ERROR: update or delete on table "alert_rule" violates foreign key constraint "alert_alert_rule_id_fkey" on table "alert"
    Detail: Key (id)=(58) is still referenced from table "alert".
  </code></pre>
  
  <p>The <code>@ExceptionHandler(value = {javax.validation.ConstraintViolationException.class,
                  org.hibernate.exception.ConstraintViolationException.class})</code> seems not working as expected. </p>
  
  <p>I just checked this <a href="https://stackoverflow.com/questions/32933854/nested-exception-handling-in-spring-mvc">post</a> which points out that <strong>specific</strong> exception handler should be handled when used with <strong>general</strong> handler. </p>
  
  <p>And also this <a href="https://stackoverflow.com/questions/4221064/spring-exceptionhandler-handling-multiple-kinds-of-exceptions">post</a>, so <strong>multiple</strong> exceptions can be handled in <strong>one single</strong> handler. </p>
  
  <pre><code>@RestControllerAdvice
  @Slf4j
  public class GlobalControllerExceptionHandler {
  
      @ExceptionHandler(value = {javax.validation.ConstraintViolationException.class,
              org.hibernate.exception.ConstraintViolationException.class})
      public void constraintViolationException(Exception ex,
                                                        WebRequest req) {
          log.error("Constraint violation while processing {}", req.toString());
      }
  
  
  
      @ExceptionHandler(value = {Exception.class})
      public void unknownException(Exception ex, WebRequest req) {
          log.error("Unknown Internal Exception happens");
      }
  }
  </code></pre>
  
  <p>Is there something I missed, thanks for any helpful details. </p>