List of usage examples for org.springframework.web HttpMediaTypeNotAcceptableException getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:br.com.modoagil.asr.rest.support.RESTErrorHandler.java
/** * Manipula exceo para status HTTP {@code 406} * * @param ex//from www . j a va 2s . co m * {@link HttpMediaTypeNotAcceptableException} * @return resposta ao cliente */ @ResponseBody @ExceptionHandler(HttpMediaTypeNotAcceptableException.class) public Response<E> processHttpMediaTypeNotAcceptableException(final HttpMediaTypeNotAcceptableException ex) { this.logger.info("handleHttpMediaTypeNotAcceptableException - Catching: " + ex.getClass().getSimpleName(), ex); return new ResponseBuilder<E>().success(false).message(ex.getMessage()).status(HttpStatus.NOT_ACCEPTABLE) .build(); }