From 6ea3afc1404226677e067febfcd34a1f5afe9962 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期四, 27 八月 2026 18:53:12 +0800
Subject: [PATCH] fix: 修改ai的key
---
src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java b/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java
index f0467b3..1789bb3 100644
--- a/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java
+++ b/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java
@@ -8,6 +8,7 @@
import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.MissingPathVariableException;
+import org.springframework.web.bind.MissingServletRequestParameterException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
@@ -75,6 +76,17 @@
}
/**
+ * 璇锋眰鍙傛暟缂哄け
+ */
+ @ExceptionHandler(MissingServletRequestParameterException.class)
+ public AjaxResult handleMissingServletRequestParameterException(MissingServletRequestParameterException e, HttpServletRequest request)
+ {
+ String requestURI = request.getRequestURI();
+ log.error("璇锋眰鍦板潃'{}',缂哄皯蹇呴渶鐨勮姹傚弬鏁�'{}'", requestURI, e.getParameterName());
+ return AjaxResult.error(String.format("缂哄皯蹇呴渶鐨勮姹傚弬鏁癧%s]", e.getParameterName()));
+ }
+
+ /**
* 璇锋眰鍙傛暟绫诲瀷涓嶅尮閰�
*/
@ExceptionHandler(MethodArgumentTypeMismatchException.class)
--
Gitblit v1.9.3