List of usage examples for org.springframework.web HttpRequestMethodNotSupportedException getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:br.com.modoagil.asr.rest.support.RESTErrorHandler.java
/** * Manipula exceo para status HTTP {@code 405} * * @param ex//from w ww. j a v a 2 s . c om * {@link HttpRequestMethodNotSupportedException} * @return resposta ao cliente */ @ResponseBody @ExceptionHandler(HttpRequestMethodNotSupportedException.class) public Response<E> processHttpRequestMethodNotSupportedException( final HttpRequestMethodNotSupportedException ex) { this.logger.info( "handleHttpRequestMethodNotSupportedException - Catching: " + ex.getClass().getSimpleName(), ex); return new ResponseBuilder<E>().success(false).message(ex.getMethod() + " no suportado.") .status(HttpStatus.METHOD_NOT_ALLOWED).build(); }
From source file:com.haulmont.restapi.idp.IdpAuthController.java
@ExceptionHandler(HttpRequestMethodNotSupportedException.class) public ResponseEntity<OAuth2Exception> handleHttpRequestMethodNotSupportedException( HttpRequestMethodNotSupportedException e) throws Exception { log.info("Handling error: {}, {}", e.getClass().getSimpleName(), e.getMessage()); return getExceptionTranslator().translate(e); }