自动化立体仓库 - WMS系统
Junjie
2023-06-03 c98f5558bccd7744f61cc25367e98e56598f0ebd
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");