修复已知问题
This commit is contained in:
@ -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()) {
|
||||
|
Reference in New Issue
Block a user