修改app版本信息文件路径

master
gongzhenkun 2 years ago
parent c7c4447920
commit 63c4173987

@ -717,7 +717,7 @@ public class AppController extends BaseController
@GetMapping("/version/info") @GetMapping("/version/info")
public AjaxResult queryVersionInformation(){ public AjaxResult queryVersionInformation(){
String localPath = RuoYiConfig.getAppInfoPath(); String localPath = RuoYiConfig.getAppInfoPath();
String file = FileUtils.readJsonFile(localPath + "appVersion.json"); String file = FileUtils.readJsonFile(localPath +"/" + "appVersion.json");
return AjaxResult.success(JSONObject.parseObject(file)); return AjaxResult.success(JSONObject.parseObject(file));
} }
} }

@ -347,7 +347,7 @@ public class FileUtils
* @return {@code String} * @return {@code String}
*/ */
public static String readJsonFile(String Filename) { public static String readJsonFile(String Filename) {
String jsonStr = ""; String jsonStr;
try { try {
File jsonFile = new File(Filename); File jsonFile = new File(Filename);
FileReader fileReader = new FileReader(jsonFile); FileReader fileReader = new FileReader(jsonFile);
@ -362,8 +362,7 @@ public class FileUtils
jsonStr = sb.toString(); jsonStr = sb.toString();
return jsonStr; return jsonStr;
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); throw new ServiceException(e.getMessage());
return null;
} }
} }
} }

Loading…
Cancel
Save