Browse Source

将4dkankanjson文件迁移到项目目录外

zhujinghui 4 years ago
parent
commit
d3a355140f

+ 3 - 1
src/main/java/com/example/demo/controller/ImportDataController.java

@@ -73,6 +73,9 @@ public class ImportDataController {
     @Value("${build.url}")
     private String buildUrl;
 
+    @Value("${upload.file.location}")
+    private String path;
+
     /**
      * 导入数据生成风格场景
      * @param sceneNum
@@ -446,7 +449,6 @@ public class ImportDataController {
                 entry = getInfoJson.getJSONObject("data").getString("entry");
             }
 
-            String path = ResourceUtils.getURL("classpath:").getPath();
             path = URLDecoder.decode(path,"utf-8");
             path = path + File.separator + "data/" + num;
             System.out.println("文件路径:" + path);