| | |
| | | @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"); |