From f467836d9160df8d3446864408d126e87199d3f0 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期五, 02 六月 2023 16:06:20 +0800 Subject: [PATCH] #平库库位初始化 --- src/main/java/com/zy/asrs/controller/MapController.java | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/zy/asrs/controller/MapController.java b/src/main/java/com/zy/asrs/controller/MapController.java index e52e038..8cf5c35 100644 --- a/src/main/java/com/zy/asrs/controller/MapController.java +++ b/src/main/java/com/zy/asrs/controller/MapController.java @@ -35,10 +35,11 @@ @ManagerAuth public String getMapData(@PathVariable("lev") Integer lev) { try { -// String mapFilename = "map.json"; + String mapFilename = "map.json"; // String fileName ="file:" + new ClassPathResource(mapFilename).getPath(); -// String fileName = this.getClass().getClassLoader().getResource(mapFilename).getPath();//鑾峰彇鏂囦欢璺緞 - File file = new File("D:\\workspace\\zy-asrs\\src\\main\\resources\\map.json"); + String fileName = this.getClass().getClassLoader().getResource(mapFilename).getPath();//鑾峰彇鏂囦欢璺緞 +// File file = new File("D:\\workspace\\zy-asrs\\src\\main\\resources\\map.json"); + File file = new File(fileName); StringBuffer stringBuffer = new StringBuffer(); if (file.isFile() && file.exists()) { InputStreamReader isr = new InputStreamReader(new FileInputStream(file), "GBK"); -- Gitblit v1.9.1