From bc00242ee0410684eb9f4c5fe0aa486dfebb3162 Mon Sep 17 00:00:00 2001
From: lead <lead@local>
Date: 星期二, 03 十一月 2026 10:09:31 +0800
Subject: [PATCH] fix(api): 修复全量接口扫描发现的 500 —— 由 70 个降到 0 个
---
yudao-module-infra/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/yudao-module-infra/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java b/yudao-module-infra/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java
index 98c6e50..19e4e15 100644
--- a/yudao-module-infra/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java
+++ b/yudao-module-infra/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java
@@ -11,6 +11,7 @@
import cn.iocoder.yudao.module.infra.controller.admin.file.vo.file.*;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
+import com.google.common.cache.CacheLoader;
import com.google.common.util.concurrent.UncheckedExecutionException;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
@@ -126,6 +127,11 @@
log.warn("[getFileContent][configId({}) path({}) 鏂囦欢閰嶇疆涓嶅瓨鍦╙", configId, path);
response.setStatus(HttpStatus.NOT_FOUND.value());
return;
+ } catch (CacheLoader.InvalidCacheLoadException ex) {
+ // LoadingCache 鐨� load 杩斿洖 null 鏃舵姏鍑猴紙渚嬪鍘嗗彶鏂囦欢璁板綍鐨� configId 宸茶鍒犻櫎锛夛紝鍚屾牱鎸夎祫婧愪笉瀛樺湪澶勭悊
+ log.warn("[getFileContent][configId({}) path({}) 鏂囦欢閰嶇疆涓嶅瓨鍦╙", configId, path);
+ response.setStatus(HttpStatus.NOT_FOUND.value());
+ return;
}
if (content == null) {
log.warn("[getFileContent][configId({}) path({}) 鏂囦欢涓嶅瓨鍦╙", configId, path);
--
Gitblit v1.9.3