修复已知问题

This commit is contained in:
2023-08-28 15:07:37 +08:00
parent 0beec730e8
commit 7264d82019
38 changed files with 6035 additions and 790 deletions

View File

@ -1,8 +1,8 @@
package com.ailanyin.common.utils;
import cn.hutool.core.io.IoUtil;
import cn.hutool.core.lang.UUID;
import com.ailanyin.common.exception.Asserts;
import com.alibaba.fastjson.util.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.multipart.MultipartFile;
@ -91,8 +91,8 @@ public class FileUtil {
} catch (IOException e) {
throw e;
} finally {
IOUtils.close(os);
IOUtils.close(fis);
IoUtil.close(os);
IoUtil.close(fis);
}
}
@ -261,7 +261,7 @@ public class FileUtil {
String filePath = FileUtil.class.getProtectionDomain().getCodeSource().getLocation().getFile();
String jarPath = filePath.split(".jar!")[0];
jarPath = jarPath.split("file:")[1];
return jarPath.substring(0,jarPath.lastIndexOf("/"));
return jarPath.substring(0, jarPath.lastIndexOf("/"));
} catch (Exception e) {
File desc = new File("/opt/jar");
if (!desc.exists()) {