@ExceptionHandler(DataAccessException.class) @ResponseStatus(value=HttpStatus.INTERNAL_SERVER_ERROR) public @ResponseBody ErrorResponse resolveDataAccessException(DataAccessException e) throws IOException {
  if (logger.isLoggable(Level.WARNING))   logger.log(Level.WARNING,"received DataAccessException exception",e);
  return new ErrorResponse(new ExceptionMessage(e));
}

@ ExceptionHandler ( DataAccessException . class ) @ ResponseStatus ( value = HttpStatus . INTERNAL_SERVER_ERROR ) public @ ResponseBody ErrorResponse resolveDataAccessException ( DataAccessException e ) throws IOException { if ( logger . isLoggable ( Level . WARNING ) ) logger . log ( Level . WARNING , "received DataAccessException exception" , e ) ; return new ErrorResponse ( new ExceptionMessage ( e ) ) ; }
dataacessexception handler , returns an error response to the client
