From 8adb0b2b7095ca20163e533f062ab4b3ed8d184c Mon Sep 17 00:00:00 2001 From: zhangzq Date: Wed, 19 Feb 2025 16:25:55 +0800 Subject: [PATCH] =?UTF-8?q?opt:=E6=97=A5=E5=BF=97=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/org/nl/modules/logging/aspect/LogAspect.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/modules/logging/aspect/LogAspect.java b/lms/nladmin-system/src/main/java/org/nl/modules/logging/aspect/LogAspect.java index 938b8f5f3..2e8c7af55 100644 --- a/lms/nladmin-system/src/main/java/org/nl/modules/logging/aspect/LogAspect.java +++ b/lms/nladmin-system/src/main/java/org/nl/modules/logging/aspect/LogAspect.java @@ -28,6 +28,7 @@ import org.nl.common.utils.BaseCode; import org.nl.common.utils.IdUtil; import org.nl.common.utils.SecurityUtils; import org.nl.config.lucene.LuceneAppender; +import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.common.utils.RequestHolder; import org.nl.modules.common.utils.StringUtils; import org.nl.modules.common.utils.ThrowableUtil; @@ -118,7 +119,11 @@ public class LogAspect { } } log.error("[-requestError-][请求接口:{}]【异常信息:{}】[请求参数:{}] {}", url, errorMsg, params, errorStack.append("】").toString()); - throw ex; + if (ex instanceof BadRequestException){ + throw ex; + }else { + throw new BadRequestException("系统繁忙,请联系管理员确认,后再试并"); + } } finally { log.info("[--response--][请求接口:{} 执行结束][耗时:{}s]", url, (System.currentTimeMillis() - comming) / 1000); MDC.clear();