perf:移除hutool的http模块,使用okhttp3

This commit is contained in:
曾文豪
2024-07-30 13:39:45 +08:00
parent 450d1fb869
commit 333d283e24
19 changed files with 351 additions and 65 deletions

View File

@@ -6,8 +6,8 @@ import cn.hutool.core.util.CharUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.spring.SpringUtil;
import cn.hutool.http.HttpUtil;
import com.tiesheng.util.config.GlobalConfig;
import com.tiesheng.util.service.http.OkHttpUtil;
public class FileUploadPath {
@@ -71,7 +71,7 @@ public class FileUploadPath {
String newFileName = UPLOAD_FOLDER + StrUtil.subAfter(httpUrl, UPLOAD_FOLDER, true);
FileUploadPath uploadPath = file(newFileName);
if (!FileUtil.exist(uploadPath.getAbsolutePath())) {
HttpUtil.downloadFile(httpUrl, uploadPath.getAbsolutePath());
OkHttpUtil.downloadFile(httpUrl, uploadPath.getAbsolutePath());
}
return uploadPath.getHttpPath();