From 996f0b414fa4b235793151032aaebcc483ca7e1c Mon Sep 17 00:00:00 2001 From: gongzhenkun <1658878546@qq.com> Date: Fri, 26 Aug 2022 17:20:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9app=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=96=87=E4=BB=B6=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/web/controller/api/AppController.java | 2 +- .../main/java/com/ruoyi/common/config/RuoYiConfig.java | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java index 0708893..38139e2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java @@ -710,7 +710,7 @@ public class AppController extends BaseController @Log(title = "APP查询版本信息", businessType = BusinessType.OTHER) @GetMapping("/version/info") public AjaxResult queryVersionInformation(){ - String localPath = RuoYiConfig.getProfile(); + String localPath = RuoYiConfig.getAppInfoPath(); String file = FileUtils.readJsonFile(localPath + "appVersion.json"); return AjaxResult.success(JSONObject.parseObject(file)); } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java b/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java index 00f70f6..eeb224c 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java @@ -132,4 +132,12 @@ public class RuoYiConfig { return getProfile() + "/upload"; } + + /** + * 获取上传路径 + */ + public static String getAppInfoPath() + { + return getProfile() + "/appInfo"; + } }