From 896b0d72abd1e312917e5216e8912f10875852fa Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 15 六月 2026 09:46:17 +0800
Subject: [PATCH] feat(technology): 生产工序新增计划人员和计划执行人员字段
---
src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 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 bcea0a7..1789bb3 100644
--- a/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java
+++ b/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java
@@ -1,6 +1,6 @@
package com.ruoyi.framework.web.exception;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.access.AccessDeniedException;
@@ -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