Package pub.ihub.cloud.advice
Class GlobalExceptionAdvice
java.lang.Object
pub.ihub.cloud.advice.GlobalExceptionAdvice
@ControllerAdvice
@Order(-2147483638)
@ResponseBody
public class GlobalExceptionAdvice
extends Object
全局异常处理
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionResult<?>Result<?>handlerException(pub.ihub.core.BusinessException e)
-
Field Details
-
ORDER
public static final int ORDER默认顺序- See Also:
-
-
Constructor Details
-
GlobalExceptionAdvice
public GlobalExceptionAdvice()
-
-
Method Details
-
handlerException
@ExceptionHandler(pub.ihub.core.BusinessException.class) @ResponseStatus(OK) public Result<?> handlerException(pub.ihub.core.BusinessException e) -
handlerException
@ExceptionHandler(java.lang.Throwable.class) @ResponseStatus(INTERNAL_SERVER_ERROR) public Result<?> handlerException(Throwable e)
-