perf:移除hutool的http模块,使用okhttp3
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user