@RestControllerAdvice @Order(value=1) public class ZiyiExceptionHandler extends Object
| 构造器和说明 |
|---|
ZiyiExceptionHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
BaseResponse |
exceptionHandler(BaseException e)
拦截自定义异常进行处理
|
BaseResponse |
exceptionHandler(org.springframework.validation.BindException e)
参数校验错误
|
BaseResponse |
exceptionHandler(Exception e)
拦截Exception异常
|
BaseResponse |
exceptionHandler(org.springframework.web.HttpMediaTypeNotSupportedException e)
请求Content type不支持
|
BaseResponse |
exceptionHandler(org.springframework.http.converter.HttpMessageNotReadableException e)
post参数解析错误
|
BaseResponse |
exceptionHandler(org.springframework.web.HttpRequestMethodNotSupportedException e)
请求方法不支持
|
BaseResponse |
exceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException e)
参数校验错误
|
@ExceptionHandler(value=cn.ziyicloud.framework.boot.exception.BaseException.class) public BaseResponse exceptionHandler(BaseException e)
e - ZiyiBootException@ExceptionHandler(value=org.springframework.http.converter.HttpMessageNotReadableException.class) public BaseResponse exceptionHandler(org.springframework.http.converter.HttpMessageNotReadableException e)
@ExceptionHandler(value=org.springframework.web.HttpRequestMethodNotSupportedException.class) public BaseResponse exceptionHandler(org.springframework.web.HttpRequestMethodNotSupportedException e)
@ExceptionHandler(value=org.springframework.web.HttpMediaTypeNotSupportedException.class) public BaseResponse exceptionHandler(org.springframework.web.HttpMediaTypeNotSupportedException e)
@ExceptionHandler(value=org.springframework.validation.BindException.class) public BaseResponse exceptionHandler(org.springframework.validation.BindException e)
@ExceptionHandler(value=org.springframework.web.bind.MethodArgumentNotValidException.class) public BaseResponse exceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException e)
@ExceptionHandler(value=java.lang.Exception.class) public BaseResponse exceptionHandler(Exception e)
Copyright © 2022. All rights reserved.