From 0fc796b90d3f44b81ef30285edb897223df439f7 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期五, 13 一月 2023 23:04:09 +0800 Subject: [PATCH] update 适配 javax.servlet 替换为 jakarta.servlet 更新所有代码 update 适配 ServletUtils 更换继承 JakartaServletUtil --- ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssServiceImpl.java | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssServiceImpl.java index 4b1d254..819cabb 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssServiceImpl.java @@ -28,7 +28,7 @@ import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; @@ -91,7 +91,7 @@ @Override public void download(Long ossId, HttpServletResponse response) throws IOException { - SysOssVo sysOss = this.getById(ossId); + SysOssVo sysOss = SpringUtils.getAopProxy(this).getById(ossId); if (ObjectUtil.isNull(sysOss)) { throw new ServiceException("鏂囦欢鏁版嵁涓嶅瓨鍦�!"); } @@ -114,7 +114,7 @@ OssClient storage = OssFactory.instance(); UploadResult uploadResult; try { - uploadResult = storage.uploadSuffix(file.getInputStream(), suffix, file.getContentType()); + uploadResult = storage.uploadSuffix(file.getBytes(), suffix, file.getContentType()); } catch (IOException e) { throw new ServiceException(e.getMessage()); } -- Gitblit v1.9.3