将 FileTypeUtils 从 infra-server 迁至 common

pull/236/head
Danlin 2026-01-19 12:13:06 +08:00
parent 17a1af1069
commit 55c28413ef
6 changed files with 9 additions and 9 deletions

View File

@ -145,6 +145,11 @@
<artifactId>easy-trans-anno</artifactId> <!-- 默认引入的原因,方便 xxx-module-api 包使用 --> <artifactId>easy-trans-anno</artifactId> <!-- 默认引入的原因,方便 xxx-module-api 包使用 -->
</dependency> </dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId> <!-- 文件客户端:文件类型的识别 -->
</dependency>
<!-- Test 测试相关 --> <!-- Test 测试相关 -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>

View File

@ -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.io.IoUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;

View File

@ -137,11 +137,6 @@
<artifactId>s3</artifactId> <artifactId>s3</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId> <!-- 文件客户端:文件类型的识别 -->
</dependency>
</dependencies> </dependencies>
<build> <build>
<!-- 设置构建的 jar 包名 --> <!-- 设置构建的 jar 包名 -->

View File

@ -35,7 +35,7 @@ import java.util.Map;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; 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.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 = "管理后台 - 代码生成器") @Tag(name = "管理后台 - 代码生成器")
@RestController @RestController

View File

@ -31,7 +31,7 @@ import java.nio.charset.StandardCharsets;
import java.util.List; import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; 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 = "管理后台 - 文件存储") @Tag(name = "管理后台 - 文件存储")
@RestController @RestController

View File

@ -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.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.dal.mysql.file.FileMapper; 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.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 com.google.common.annotations.VisibleForTesting;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import lombok.SneakyThrows; import lombok.SneakyThrows;