那把java.lang.Exception和java.lang.Throwable都加上,这样肯定能拦截到
@ExceptionHandler(value = Exception.class)
public Result<Object> baseExceptionHandler(Exception exception) {
return Result.error("系统繁忙");
}
@ExceptionHandler(value = Throwable.class)
public Result<Object> baseExceptionHandler(Throwable exception) {
return Result.error("系统繁忙");
}