|
|
@@ -33,6 +33,10 @@ public class GlobalSystemExceptionHandler {
|
|
|
@ResponseBody
|
|
|
public HttpResult handlerRuntimeException(RuntimeException e) {
|
|
|
log.error("业务异常:", e);
|
|
|
+ // 处理Dubbo服务不可用异常
|
|
|
+ if (e.getMessage() != null && e.getMessage().contains("No provider available")) {
|
|
|
+ return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, "服务暂时不可用,请稍后重试");
|
|
|
+ }
|
|
|
return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, e.getMessage());
|
|
|
}
|
|
|
|