@Order(value=-2147483648) @Configuration(proxyBeanMethods=false) @RestControllerAdvice @ConditionalOnWebApplication(type=SERVLET) public class RestExceptionTranslator extends Object
| 构造器和说明 |
|---|
RestExceptionTranslator() |
| 限定符和类型 | 方法和说明 |
|---|---|
R<Object> |
handleError(org.springframework.validation.BindException e) |
R<Object> |
handleError(javax.validation.ConstraintViolationException e) |
R<Object> |
handleError(org.springframework.web.HttpMediaTypeNotAcceptableException e) |
R<Object> |
handleError(org.springframework.web.HttpMediaTypeNotSupportedException e) |
R<Object> |
handleError(org.springframework.http.converter.HttpMessageNotReadableException e) |
R<Object> |
handleError(org.springframework.web.HttpRequestMethodNotSupportedException e) |
R<Object> |
handleError(org.springframework.web.bind.MethodArgumentNotValidException e) |
R<Object> |
handleError(org.springframework.web.method.annotation.MethodArgumentTypeMismatchException e) |
R<Object> |
handleError(org.springframework.web.bind.MissingServletRequestParameterException e) |
R<Object> |
handleError(org.springframework.web.servlet.NoHandlerFoundException e) |
@ExceptionHandler(value=org.springframework.web.bind.MissingServletRequestParameterException.class) @ResponseStatus(value=BAD_REQUEST) public R<Object> handleError(org.springframework.web.bind.MissingServletRequestParameterException e)
@ExceptionHandler(value=org.springframework.web.method.annotation.MethodArgumentTypeMismatchException.class) @ResponseStatus(value=BAD_REQUEST) public R<Object> handleError(org.springframework.web.method.annotation.MethodArgumentTypeMismatchException e)
@ExceptionHandler(value=org.springframework.web.bind.MethodArgumentNotValidException.class) @ResponseStatus(value=BAD_REQUEST) public R<Object> handleError(org.springframework.web.bind.MethodArgumentNotValidException e)
@ExceptionHandler(value=org.springframework.validation.BindException.class) @ResponseStatus(value=BAD_REQUEST) public R<Object> handleError(org.springframework.validation.BindException e)
@ExceptionHandler(value=javax.validation.ConstraintViolationException.class) @ResponseStatus(value=BAD_REQUEST) public R<Object> handleError(javax.validation.ConstraintViolationException e)
@ExceptionHandler(value=org.springframework.web.servlet.NoHandlerFoundException.class) @ResponseStatus(value=NOT_FOUND) public R<Object> handleError(org.springframework.web.servlet.NoHandlerFoundException e)
@ExceptionHandler(value=org.springframework.http.converter.HttpMessageNotReadableException.class) @ResponseStatus(value=BAD_REQUEST) public R<Object> handleError(org.springframework.http.converter.HttpMessageNotReadableException e)
@ExceptionHandler(value=org.springframework.web.HttpRequestMethodNotSupportedException.class) @ResponseStatus(value=METHOD_NOT_ALLOWED) public R<Object> handleError(org.springframework.web.HttpRequestMethodNotSupportedException e)
@ExceptionHandler(value=org.springframework.web.HttpMediaTypeNotSupportedException.class) @ResponseStatus(value=UNSUPPORTED_MEDIA_TYPE) public R<Object> handleError(org.springframework.web.HttpMediaTypeNotSupportedException e)
Copyright © 2021. All rights reserved.