From 4f8b4d795e8f991fa24b37e2b7c1ec837de8f072 Mon Sep 17 00:00:00 2001 From: jiangzeyin Date: Tue, 5 Mar 2019 16:07:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E9=83=A8=E9=85=8D=E7=BD=AE=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=E7=9B=B8=E5=AF=B9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/release.xml | 2 +- .../java/cn/keepbx/jpom/system/ExtConfigBean.java | 2 +- .../system/ExtConfigEnvironmentPostProcessor.java | 3 +++ src/main/java/cn/keepbx/jpom/system/WebAopLog.java | 13 ++++++++++--- src/main/resources/vm/manage/projectInfo.vm | 4 ++-- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/script/release.xml b/script/release.xml index 3cda03cec..4ecfc5acf 100644 --- a/script/release.xml +++ b/script/release.xml @@ -22,7 +22,7 @@ ${basedir}/src/main/resources/bin/ - /lib/ + / extConfig.yml diff --git a/src/main/java/cn/keepbx/jpom/system/ExtConfigBean.java b/src/main/java/cn/keepbx/jpom/system/ExtConfigBean.java index c42a95da0..11fc3854d 100644 --- a/src/main/java/cn/keepbx/jpom/system/ExtConfigBean.java +++ b/src/main/java/cn/keepbx/jpom/system/ExtConfigBean.java @@ -33,7 +33,7 @@ public class ExtConfigBean { String path = (home.getSource() == null ? "" : home.getSource().getAbsolutePath()); File file = new File(path); if (file.isFile()) { - file = file.getParentFile(); + file = file.getParentFile().getParentFile(); } else { file = new File(file, "bin"); } diff --git a/src/main/java/cn/keepbx/jpom/system/ExtConfigEnvironmentPostProcessor.java b/src/main/java/cn/keepbx/jpom/system/ExtConfigEnvironmentPostProcessor.java index 76ef2e486..bbf8fdd13 100644 --- a/src/main/java/cn/keepbx/jpom/system/ExtConfigEnvironmentPostProcessor.java +++ b/src/main/java/cn/keepbx/jpom/system/ExtConfigEnvironmentPostProcessor.java @@ -18,8 +18,11 @@ import java.io.IOException; */ public class ExtConfigEnvironmentPostProcessor implements EnvironmentPostProcessor { + private static ConfigurableEnvironment configurableEnvironment; + @Override public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) { + configurableEnvironment = environment; File directory = ExtConfigBean.getFile(); if (!directory.exists()) { return; diff --git a/src/main/java/cn/keepbx/jpom/system/WebAopLog.java b/src/main/java/cn/keepbx/jpom/system/WebAopLog.java index 1d6850f9a..036b1a2a8 100644 --- a/src/main/java/cn/keepbx/jpom/system/WebAopLog.java +++ b/src/main/java/cn/keepbx/jpom/system/WebAopLog.java @@ -11,6 +11,7 @@ import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.reflect.MethodSignature; +import org.springframework.boot.ApplicationHome; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; @@ -67,9 +68,15 @@ public class WebAopLog extends PropertyDefinerBase { public String getPropertyValue() { String path = JpomApplication.getArgs("jpom.log"); if (StrUtil.isEmpty(path)) { - File directory = new File(""); - directory = new File(directory.getAbsolutePath(), "log"); - path = directory.getPath(); + // + ApplicationHome home = new ApplicationHome(WebAopLog.class); + path = (home.getSource() == null ? "" : home.getSource().getAbsolutePath()); + File file = new File(path); + if (file.isFile()) { + file = file.getParentFile().getParentFile(); + } + file = new File(file, "log"); + path = file.getPath(); } // 配置默认日志路径 DefaultSystemLog.configPath(path, false); diff --git a/src/main/resources/vm/manage/projectInfo.vm b/src/main/resources/vm/manage/projectInfo.vm index 961191381..0966ef666 100644 --- a/src/main/resources/vm/manage/projectInfo.vm +++ b/src/main/resources/vm/manage/projectInfo.vm @@ -96,7 +96,7 @@ id: 'table_project', elem: '#tab_project', url: '/manage/getProjectInfo', - height: 'full-52', + // height: 'full-52', even: true, cols: [[{ field: 'name', title: '项目名称', width: '15%', templet: function (d) { @@ -248,7 +248,7 @@ function reloadTable() { table.reload('table_project', { - height: 'full-52' + // height: 'full-52' }); }