hxx 2 년 전
부모
커밋
6fa7f1944f

+ 1 - 1
profiles/dev/userconfig/user.properties

@@ -2,4 +2,4 @@
 cfdurl=http://192.168.0.43:8081/
 cfduid=5f06c8bc77234f969d13e160b54c27e3
 cfdtoken=e47b87eec69545559d1e81e56626da68
-es.host=http://localhost:8031/
+es.host=http://localhost:8031

+ 1 - 1
src/main/java/com/miniframe/bisiness/system/C00006Service.java

@@ -19,7 +19,7 @@ public class C00006Service extends C00006BaseModel implements ExecProcessFlow {
 	 * 基础系统,“项目求解日志”业务核心处理
  	 */
 	public void transExecute() throws Exception {
-		IniFileReader ini = new IniFileReader("user.properties");
+		IniFileReader ini = new IniFileReader("userconfig/user.properties");
 		String host = ini.getStrValue("es.host")+"/searchAllLog";
 		String path ="";
 		String method="";

+ 1 - 1
src/main/java/com/miniframe/bisiness/system/C00007Service.java

@@ -19,7 +19,7 @@ public class C00007Service extends C00007BaseModel implements ExecProcessFlow {
 	 * 基础系统,“项目求解每步数据”业务核心处理
  	 */
 	public void transExecute() throws Exception {
-		IniFileReader ini = new IniFileReader("user.properties");
+		IniFileReader ini = new IniFileReader("userconfig/user.properties");
 		String host = ini.getStrValue("es.host")+"/searchAllIter";
 		String path ="";
 		String method="";

+ 36 - 30
src/main/java/com/miniframe/tools/XIFileUtils.java

@@ -2,6 +2,7 @@ package com.miniframe.tools;
 
 import com.google.common.io.Resources;
 import com.miniframe.constant.MFConstant;
+import com.miniframe.core.IniFileReader;
 import com.miniframe.core.ext.UtilTools;
 import com.miniframe.generate.appcode.FileType;
 import com.miniframe.model.system.SysFile;
@@ -43,40 +44,45 @@ public class XIFileUtils {
 //        fileRootPathStr =Paths.get(pathStr).toString().replace("\\", XIConfig.separator)+XIConfig.separator;
 
 
+
     }
 
     public static void main(String[] args) {
-        Path path = Paths.get("e:/opt/files/a/b/c/d/1111.mp4");
-        getRelativizePathStr("/opt/files/device.rar");
-
-        getAbsolutePathStr("/1/opt/files/device.rar");
-
-        String fileName = path.getFileName().toString();
-
-        String md5 = XIUtils.getMD5(fileName);
-        String first = md5.substring(0, 2);//第一级目录
-        String second = md5.substring(2, 4);//第二级目录
-
-
-        String pathTo = getFilePathStr("group", first, second, fileName);
-
-        try {
-            InputStream inputStream = Files.newInputStream(Paths.get("/opt/files/890adbc8ba984e429464fe782e4fa3e9-1e66ddc664aa43958b690c8c46cdd364_20210203102343.aac"));
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-        String mimeType = MFMimeTypeUtils.getMimeType("/opt/files/890adbc8ba984e429464fe782e4fa3e9-1e66ddc664aa43958b690c8c46cdd364_20210203102343.aac");
-
-        ContentType contentType = ContentType.create(mimeType);
-
-        String suffix = getExtensionWithDot("e:/1/2/3\\5/5.mp4");
+//        Path path = Paths.get("e:/opt/files/a/b/c/d/1111.mp4");
+//        getRelativizePathStr("/opt/files/device.rar");
+//
+//        getAbsolutePathStr("/1/opt/files/device.rar");
+//
+//        String fileName = path.getFileName().toString();
+//
+//        String md5 = XIUtils.getMD5(fileName);
+//        String first = md5.substring(0, 2);//第一级目录
+//        String second = md5.substring(2, 4);//第二级目录
+//
+//
+//        String pathTo = getFilePathStr("group", first, second, fileName);
+//
+//        try {
+//            InputStream inputStream = Files.newInputStream(Paths.get("/opt/files/890adbc8ba984e429464fe782e4fa3e9-1e66ddc664aa43958b690c8c46cdd364_20210203102343.aac"));
+//        } catch (IOException e) {
+//            e.printStackTrace();
+//        }
+//        String mimeType = MFMimeTypeUtils.getMimeType("/opt/files/890adbc8ba984e429464fe782e4fa3e9-1e66ddc664aa43958b690c8c46cdd364_20210203102343.aac");
+//
+//        ContentType contentType = ContentType.create(mimeType);
+//
+//        String suffix = getExtensionWithDot("e:/1/2/3\\5/5.mp4");
+//
+//        String uuid = UtilTools.getUUid();
+//        String uploadDirStr = "/opt/files/";
+//        for (int i = 0; i < 2; i++) {
+//            uploadDirStr += uuid.substring(i * 2, i * 2 + 2) + "/";
+//        }
+//        int x = 0;
 
-        String uuid = UtilTools.getUUid();
-        String uploadDirStr = "/opt/files/";
-        for (int i = 0; i < 2; i++) {
-            uploadDirStr += uuid.substring(i * 2, i * 2 + 2) + "/";
-        }
-        int x = 0;
+        IniFileReader ini = new IniFileReader("userconfig/user.properties");
+        String host = ini.getStrValue("es.host")+"/searchAllLog";
+        System.out.println(host);
     }
 
     public static String getRelativizePathStr(Path path) {