@RestControllerAdvice public class GlobalExceptionHandler extends Object
| 构造器和说明 |
|---|
GlobalExceptionHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
com.founder.common.core.web.domain.AjaxResult |
baseException(com.founder.common.core.exception.BaseException e)
基础异常
|
com.founder.common.core.web.domain.AjaxResult |
businessException(com.founder.common.core.exception.CustomException e)
业务异常
|
com.founder.common.core.web.domain.AjaxResult |
demoModeException(com.founder.common.core.exception.DemoModeException e)
演示模式异常
|
com.founder.common.core.web.domain.AjaxResult |
handleException(Exception e) |
com.founder.common.core.web.domain.AjaxResult |
InnerAuthException(com.founder.common.core.exception.InnerAuthException e)
内部认证异常
|
com.founder.common.core.web.domain.AjaxResult |
preAuthorizeException(com.founder.common.core.exception.PreAuthorizeException e)
权限异常
|
com.founder.common.core.web.domain.AjaxResult |
validatedBindException(org.springframework.validation.BindException e)
自定义验证异常
|
Object |
validExceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException e)
自定义验证异常
|
@ExceptionHandler(value=com.founder.common.core.exception.BaseException.class) public com.founder.common.core.web.domain.AjaxResult baseException(com.founder.common.core.exception.BaseException e)
@ExceptionHandler(value=com.founder.common.core.exception.CustomException.class) public com.founder.common.core.web.domain.AjaxResult businessException(com.founder.common.core.exception.CustomException e)
@ExceptionHandler(value=java.lang.Exception.class) public com.founder.common.core.web.domain.AjaxResult handleException(Exception e)
@ExceptionHandler(value=org.springframework.validation.BindException.class) public com.founder.common.core.web.domain.AjaxResult validatedBindException(org.springframework.validation.BindException e)
@ExceptionHandler(value=org.springframework.web.bind.MethodArgumentNotValidException.class) public Object validExceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException e)
@ExceptionHandler(value=com.founder.common.core.exception.PreAuthorizeException.class) public com.founder.common.core.web.domain.AjaxResult preAuthorizeException(com.founder.common.core.exception.PreAuthorizeException e)
@ExceptionHandler(value=com.founder.common.core.exception.InnerAuthException.class) public com.founder.common.core.web.domain.AjaxResult InnerAuthException(com.founder.common.core.exception.InnerAuthException e)
@ExceptionHandler(value=com.founder.common.core.exception.DemoModeException.class) public com.founder.common.core.web.domain.AjaxResult demoModeException(com.founder.common.core.exception.DemoModeException e)
Copyright © 2021. All rights reserved.