From 55c28413efbe6fe1b7922d80511d6dd4845d0b3d Mon Sep 17 00:00:00 2001 From: Danlin Date: Mon, 19 Jan 2026 12:13:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=20FileTypeUtils=20=E4=BB=8E=20infra-s?= =?UTF-8?q?erver=20=E8=BF=81=E8=87=B3=20common?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-framework/yudao-common/pom.xml | 5 +++++ .../yudao/framework/common/util/io}/FileTypeUtils.java | 2 +- yudao-module-infra/yudao-module-infra-server/pom.xml | 5 ----- .../infra/controller/admin/codegen/CodegenController.java | 2 +- .../module/infra/controller/admin/file/FileController.java | 2 +- .../yudao/module/infra/service/file/FileServiceImpl.java | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) rename {yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils => yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/io}/FileTypeUtils.java (98%) diff --git a/yudao-framework/yudao-common/pom.xml b/yudao-framework/yudao-common/pom.xml index 8953bb16f..cff8b6003 100644 --- a/yudao-framework/yudao-common/pom.xml +++ b/yudao-framework/yudao-common/pom.xml @@ -145,6 +145,11 @@ easy-trans-anno + + org.apache.tika + tika-core + + org.springframework.boot diff --git a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils/FileTypeUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/io/FileTypeUtils.java similarity index 98% rename from yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils/FileTypeUtils.java rename to yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/io/FileTypeUtils.java index f8cd1c45c..023c36335 100644 --- a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils/FileTypeUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/io/FileTypeUtils.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.infra.framework.file.core.utils; +package cn.iocoder.yudao.framework.common.util.io; import cn.hutool.core.io.IoUtil; import cn.hutool.core.util.StrUtil; diff --git a/yudao-module-infra/yudao-module-infra-server/pom.xml b/yudao-module-infra/yudao-module-infra-server/pom.xml index 1d56fbe66..bf0df4347 100644 --- a/yudao-module-infra/yudao-module-infra-server/pom.xml +++ b/yudao-module-infra/yudao-module-infra-server/pom.xml @@ -137,11 +137,6 @@ s3 - - org.apache.tika - tika-core - - diff --git a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java index 26dda8943..3174f3cf0 100644 --- a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java +++ b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java @@ -35,7 +35,7 @@ import java.util.Map; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserNickname; -import static cn.iocoder.yudao.module.infra.framework.file.core.utils.FileTypeUtils.writeAttachment; +import static cn.iocoder.yudao.framework.common.util.io.FileTypeUtils.writeAttachment; @Tag(name = "管理后台 - 代码生成器") @RestController diff --git a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java index ca7db6407..c35ae0cc6 100644 --- a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java +++ b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java @@ -31,7 +31,7 @@ import java.nio.charset.StandardCharsets; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.module.infra.framework.file.core.utils.FileTypeUtils.writeAttachment; +import static cn.iocoder.yudao.framework.common.util.io.FileTypeUtils.writeAttachment; @Tag(name = "管理后台 - 文件存储") @RestController diff --git a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java index 168db02c6..9a04a6d83 100644 --- a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java @@ -14,7 +14,7 @@ import cn.iocoder.yudao.module.infra.controller.admin.file.vo.file.FilePresigned import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; import cn.iocoder.yudao.module.infra.dal.mysql.file.FileMapper; import cn.iocoder.yudao.module.infra.framework.file.core.client.FileClient; -import cn.iocoder.yudao.module.infra.framework.file.core.utils.FileTypeUtils; +import cn.iocoder.yudao.framework.common.util.io.FileTypeUtils; import com.google.common.annotations.VisibleForTesting; import jakarta.annotation.Resource; import lombok.SneakyThrows;