@ExceptionHandler(ResourceConflictException.class)
    public final ResponseEntity<ExceptionResponse> resourceConflict(
            final ResourceConflictException ex) {
        final ExceptionResponse response =
                new ExceptionResponse("Conflict", ex.getMessage());
        return new ResponseEntity<ExceptionResponse>(response,
                HttpStatus.CONFLICT);
    }
@ ExceptionHandler ( ResourceConflictException . class ) public final ResponseEntity < ExceptionResponse > resourceConflict ( final ResourceConflictException ex ) { final ExceptionResponse response = new ExceptionResponse ( "Conflict" , ex . getMessage ( ) ) ; return new ResponseEntity < ExceptionResponse > ( response , HttpStatus . CONFLICT ) ; }
@param ex the exception
@return the response entity