xiewj 3 лет назад
Родитель
Сommit
e4297d0b08

+ 5 - 1
pom.xml

@@ -100,7 +100,11 @@
             <artifactId>tlog-feign-spring-boot-starter</artifactId>
             <version>1.3.6</version>
         </dependency>
-
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-configuration-processor</artifactId>
+            <optional>true</optional>
+        </dependency>
         <dependency>
             <groupId>com.google.firebase</groupId>
             <artifactId>firebase-admin</artifactId>

+ 3 - 27
src/main/java/com/fdkankan/scene/config/FdkkLaserConfig.java

@@ -23,10 +23,6 @@ public class FdkkLaserConfig {
      */
     private static String profile;
 
-    /**
-     * 区分雪花生成
-     */
-    private String workId;
 
 
     /**
@@ -44,22 +40,10 @@ public class FdkkLaserConfig {
     private static boolean isBucket;
 
     /**
-     * 生成模型的路径
-     */
-    public String buildModelPath;
-    /**
-     * 算法调用
-     */
-    public String buildCallPath;
-    /**
      * java存放路径
      */
     public String binPath;
 
-    /**
-     * 后端文件保存路径
-     */
-    public String myBackBasePath;
 
     /**
      * OSS默认路径
@@ -71,8 +55,6 @@ public class FdkkLaserConfig {
 
     @PostConstruct
     private void init() {
-        FileUtil.mkdir(buildCallPath);
-        FileUtil.mkdir(buildModelPath);
         FileUtil.mkdir(FdkkLaserConfig.profile);
     }
 
@@ -85,13 +67,7 @@ public class FdkkLaserConfig {
         FdkkLaserConfig.profile = profile;
     }
 
-    public String getWorkId() {
-        return workId;
-    }
 
-    public void setWorkId(String workId) {
-        this.workId = workId;
-    }
 
 
     public static boolean isLocalization() {
@@ -106,16 +82,16 @@ public class FdkkLaserConfig {
         return FdkkLaserConfig.isLink;
     }
 
-    public static void setIsLink(boolean isLink) {
+    public  void setIsLink(boolean isLink) {
         FdkkLaserConfig.isLink = isLink;
     }
 
 
-    public static boolean isIsBucket() {
+    public static boolean isBucket() {
         return FdkkLaserConfig.isBucket;
     }
 
-    public static void setIsBucket(boolean isBucket) {
+    public  void setIsBucket(boolean isBucket) {
         FdkkLaserConfig.isBucket = isBucket;
     }
 

+ 19 - 19
src/main/java/com/fdkankan/scene/oss/OssUtil.java

@@ -34,7 +34,7 @@ public class OssUtil {
     }
 
     public void rmFileCmd(String targetDir) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 minioOssTemplate.rmFileCmd(targetDir);
             } else {
@@ -47,7 +47,7 @@ public class OssUtil {
     }
 
     public String getHostByBucket(String bucket) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 return minioOssTemplate.calculateUrl(bucket, "");
             } else {
@@ -60,7 +60,7 @@ public class OssUtil {
 
 
     public void uploadFileChunkCmd(String defaultFolder, String sceneCode, String uploadDir, String targetDir, String mergeCode, boolean isLink) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 minioOssTemplate.uploadFileChunkCmd(defaultFolder, sceneCode, uploadDir, targetDir, mergeCode);
             } else {
@@ -92,7 +92,7 @@ public class OssUtil {
 
 
     public void uploadFileDirCmd(String uploadDir, String target, Boolean isLink) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 minioOssTemplate.uploadFileDirCmd(uploadDir, target);
             } else {
@@ -122,7 +122,7 @@ public class OssUtil {
 
 
     public String uploadFile(String pathKey, String filePath, boolean isLink) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 return minioOssTemplate.uploadFile(pathKey, filePath);
             } else {
@@ -150,7 +150,7 @@ public class OssUtil {
 
 
     public String uploadFileText(String pathKey, String text) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 return minioOssTemplate.uploadFileText(pathKey, text);
             } else {
@@ -164,7 +164,7 @@ public class OssUtil {
 
 
     public String uploadFileText(String bucket, String pathKey, String text) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 return minioOssTemplate.uploadFileText(bucket, pathKey, text);
             } else {
@@ -178,7 +178,7 @@ public class OssUtil {
 
 
     public String uploadFileBase64Image(String pathKey, String base64) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 return minioOssTemplate.uploadFileBase64Image(pathKey, base64);
             } else {
@@ -193,7 +193,7 @@ public class OssUtil {
 
 
     public String uploadFileBase64Image(String bucket, String pathKey, String base64) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 return minioOssTemplate.uploadFileBase64Image(bucket, pathKey, base64);
             } else {
@@ -208,7 +208,7 @@ public class OssUtil {
 
 
     public String uploadFileBytes(String pathKey, byte[] bytes) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 return minioOssTemplate.uploadFileBytes(pathKey, bytes);
             } else {
@@ -222,7 +222,7 @@ public class OssUtil {
 
 
     public String uploadFileBytes(String bucket, String pathKey, byte[] bytes) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 return minioOssTemplate.uploadFileBytes(bucket, pathKey, bytes);
             } else {
@@ -236,7 +236,7 @@ public class OssUtil {
 
 
     public String uploadFileStream(String pathKey, InputStream stream) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 return minioOssTemplate.uploadFileStream(pathKey, stream);
             } else {
@@ -250,7 +250,7 @@ public class OssUtil {
 
 
     public String uploadFileStream(String bucket, String pathKey, InputStream stream) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 return minioOssTemplate.uploadFileStream(bucket, pathKey, stream);
             } else {
@@ -264,7 +264,7 @@ public class OssUtil {
 
 
     public String uploadFileImage(String pathKey, String filePath, boolean isLink) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 return minioOssTemplate.uploadFileImage(pathKey, filePath);
             } else {
@@ -311,7 +311,7 @@ public class OssUtil {
 
 
     public Object downloadFile(String pathKey, String file) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 return minioOssTemplate.downloadFile(pathKey, file);
             } else {
@@ -335,7 +335,7 @@ public class OssUtil {
 
 
     public Boolean copyObject(String oldPath, String newPath) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 return minioOssTemplate.copyObject(oldPath, newPath);
             } else {
@@ -359,7 +359,7 @@ public class OssUtil {
 
 
     public void deleteObject(String keyName) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 minioOssTemplate.deleteObject(keyName);
             } else {
@@ -398,7 +398,7 @@ public class OssUtil {
 
 
     public boolean doesObjectExist(String keyName) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 return minioOssTemplate.doesObjectExist(keyName);
             } else {
@@ -420,7 +420,7 @@ public class OssUtil {
     }
 
     public String calculateUrl(String keyName) {
-        if (FdkkLaserConfig.isIsBucket()) {
+        if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {
                 return keyName;
             } else {

+ 0 - 35
src/main/java/com/fdkankan/scene/util/CmdBuildUtil.java

@@ -206,41 +206,6 @@ public class CmdBuildUtil {
         }
     }
 
-    public static Node License() throws IOException, InterruptedException {
-        String authLicenseCommandCmd = "";
-        String licensePath = CmdBuildUtil.fdkkLaserConfig.buildCallPath + File.separator + "license" + File.separator;
-        File caches = new File(licensePath + "caches");
-        FileUtil.del(caches);
-        File results = new File(licensePath + "results");
-        FileUtil.del(results);
-
-        JSONObject licenseDataJson = new JSONObject();
-        licenseDataJson.put("split_type", "SPLIT_V23");
-        licenseDataJson.put("skybox_type", "SKYBOX_V5");
-        FileUtils.writeFile(licensePath + File.separator + "data.json", licenseDataJson.toString());
-        if (CmdBuildUtil.OS.isLinux()) {
-            authLicenseCommandCmd = CmdConstant.AUTH_LICENSE_WIN;
-            CmdUtils.callLineSh(authLicenseCommandCmd);
-        } else {
-            authLicenseCommandCmd = CmdConstant.AUTH_LICENSE_WIN
-                    .replace("@inPath", licensePath);
-            CmdUtils.callLine(authLicenseCommandCmd);
-        }
-        int count = 10;
-        try {
-            for (int i = count; i > 0; i--) {
-                if (FileUtil.exist(licensePath + File.separator + "results" + File.separator + "encryption_info.xml")) {
-                    Document document = XmlUtil.readXML(licensePath + File.separator + "results" + File.separator + "encryption_info.xml");
-                    return XmlUtil.getNodeByXPath("//licenseInfo//snInfo", document);
-                }
-                Thread.sleep(1000);
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-            return null;
-        }
-        return null;
-    }
 
     public static void TiledMap(String inPath) {
         String tiledMapCmd = "";

+ 0 - 8
src/main/resources/application.yml

@@ -2,21 +2,13 @@
 fdkk:
   # 文件路径 示例( Windows配置D:/fdkk/uploadPath,Linux配置 /home/fdkk/uploadPath)
   profile: ${PROFILE_PATH}
-  # 获取ip地址开关
-  # 验证码类型 math 数组计算 char 字符验证
-  serverBasePath: D:\test
-  #算法工作目录
-  buildModelPath: ${BUILD_MODEL_PATH}
   #算法软件目录
-  buildCallPath: ${BUILD_CALL_PATH}
   binPath: ${BIN_PATH}
   defaultFolder: datav1
   # 是否本地化部署:开启此项会使用minio文件管理
   isLocalization: true
   # 是否使用文件存储系统
   isBucket: false
-  # 开启定时任务统计
-  isActiveJobStatus: false
   #是否使用软连接
   isLink: false
 aliyun: