public abstract class AbstractExceptionHandler extends Object
Constructor and Description |
---|
AbstractExceptionHandler() |
@ResponseBody @ExceptionHandler(value=ResultException.class) public abstract Result<?> resultExceptionHandler(ResultException e)
e
- 结果异常@ResponseBody @ResponseStatus(code=UNAUTHORIZED) @ExceptionHandler(value=LoginException.class) public Result<?> loginExceptionHandler(LoginException e)
e
- 登录异常@ResponseBody @ResponseStatus(code=PAYMENT_REQUIRED) @ExceptionHandler(value=AttackException.class) public Result<?> attackExceptionHandler(AttackException e)
e
- 非法请求异常@ResponseBody @ResponseStatus(code=FORBIDDEN) @ExceptionHandler(value=ForbiddenException.class) public Result<?> forbiddenExceptionHandler(ForbiddenException e)
e
- 无权限异常@ResponseBody @ResponseStatus(code=GONE) @ExceptionHandler(value=ApiVersionDeprecatedException.class) public Result<?> apiVersionDeprecatedExceptionHandler(ApiVersionDeprecatedException e)
e
- API接口版本弃用异常@ResponseBody @ExceptionHandler(value=ParamVoidException.class) public abstract Result<?> paramVoidExceptionHandler()
@ResponseBody @ExceptionHandler(value=ParamException.class) public abstract Result<?> paramExceptionHandler(ParamException e)
e
- 参数校验未通过异常@ResponseBody @ExceptionHandler(value=org.springframework.validation.BindException.class) public abstract Result<?> bindExceptionHandler(org.springframework.validation.BindException e)
e
- 验证异常@ResponseBody @ExceptionHandler(value=cn.hutool.core.exceptions.ValidateException.class) public abstract Result<?> validateExceptionHandler(cn.hutool.core.exceptions.ValidateException e)
e
- 验证异常@ResponseBody @ExceptionHandler(value=ParamDecryptException.class) public abstract Result<?> paramDecryptExceptionHandler(ParamDecryptException e)
e
- 解密异常@ResponseBody @ExceptionHandler(value=java.lang.Exception.class) public Result<?> exceptionHandler(Exception e)
e
- 异常@ResponseBody @ResponseStatus(code=VARIANT_ALSO_NEGOTIATES) @ExceptionHandler(value=DbException.class) public Result<?> dbExceptionHandler(DbException e)
e
- DB异常@ResponseBody @ResponseStatus(code=INSUFFICIENT_STORAGE) @ExceptionHandler(value=ClientFallbackException.class) public Result<?> clientFallbackExceptionHandler(ClientFallbackException e)
e
- 服务降级异常@ResponseBody @ResponseStatus(code=BANDWIDTH_LIMIT_EXCEEDED) @ExceptionHandler(value=cn.hutool.core.convert.ConvertException.class) public Result<?> convertExceptionHandler(cn.hutool.core.convert.ConvertException e)
e
- 转换异常@ExceptionHandler(value=AuthorizeException.class) public abstract void authorizeExceptionHandler(AuthorizeException e) throws IOException
e
- 认证异常IOException
- 重定向失败Copyright © 2022 Pivotal Software, Inc.. All rights reserved.