@RestController @ControllerAdvice public class GlobalExceptionHandler extends Object
| 构造器和说明 |
|---|
GlobalExceptionHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
top.lshaci.framework.common.model.JsonResponse<Object> |
argumentExceptionHandler(Exception e)
BindException and MethodArgumentNotValidException handler
|
top.lshaci.framework.common.model.JsonResponse<Object> |
baseExceptionHandler(top.lshaci.framework.common.exception.BaseException e)
Base exception handler
|
top.lshaci.framework.common.model.JsonResponse<Object> |
defaultExceptionHandler(Exception e)
Default exception handler
|
@ExceptionHandler(value=top.lshaci.framework.common.exception.BaseException.class) public top.lshaci.framework.common.model.JsonResponse<Object> baseExceptionHandler(top.lshaci.framework.common.exception.BaseException e)
e - the exception@ExceptionHandler(value={org.springframework.validation.BindException.class,org.springframework.web.bind.MethodArgumentNotValidException.class})
public top.lshaci.framework.common.model.JsonResponse<Object> argumentExceptionHandler(Exception e)
e - the exception@ExceptionHandler(value=java.lang.Exception.class) public top.lshaci.framework.common.model.JsonResponse<Object> defaultExceptionHandler(Exception e)
e - the exceptionCopyright © 2020. All rights reserved.