diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a4072601..dabf95612 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ 1. 【server】修复非超级管理员部分下载功能无法正常使用 2. 【server】ssh 私钥连接新增 `private key content` 登录 (感谢 [@震秦](https://gitee.com/zhzhenqin) [Gitee PR 159](https://gitee.com/dromara/Jpom/pulls/159) ) +3. 【server】修复非默认工作空间节点分发白名单无法保存问题(感谢@愿好) ------ diff --git a/modules/server/src/main/java/io/jpom/system/init/InitDb.java b/modules/server/src/main/java/io/jpom/system/init/InitDb.java index 1af72d9ce..041c5a77d 100644 --- a/modules/server/src/main/java/io/jpom/system/init/InitDb.java +++ b/modules/server/src/main/java/io/jpom/system/init/InitDb.java @@ -51,8 +51,6 @@ import org.springframework.beans.factory.InitializingBean; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.Resource; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; -import sun.misc.Signal; -import sun.misc.SignalHandler; import java.io.IOException; import java.io.InputStream; @@ -72,7 +70,7 @@ import java.util.stream.Collectors; @PreLoadClass(value = Integer.MIN_VALUE + 1) @Configuration @Slf4j -public class InitDb implements DisposableBean, InitializingBean, SignalHandler { +public class InitDb implements DisposableBean, InitializingBean { @PreLoadMethod(value = Integer.MIN_VALUE) private static void init() { @@ -238,14 +236,14 @@ public class InitDb implements DisposableBean, InitializingBean, SignalHandler { this.silenceDestroy(); } - private void silenceSignalHandle(String name) { - try { - Signal.handle(new Signal(name), this); - log.debug("{} signal handle success", name); - } catch (Exception e) { - log.debug("{} signal handle fail:{}", name, e.getMessage()); - } - } +// private void silenceSignalHandle(String name) { +// try { +// Signal.handle(new Signal(name), this); +// log.debug("{} signal handle success", name); +// } catch (Exception e) { +// log.debug("{} signal handle fail:{}", name, e.getMessage()); +// } +// } private void silenceDestroy() { DbConfig.getInstance().close(); @@ -259,9 +257,9 @@ public class InitDb implements DisposableBean, InitializingBean, SignalHandler { } } - @Override - public void handle(Signal signal) { - log.warn("signal event {} {}", signal.getName(), signal.getNumber()); - this.silenceDestroy(); - } +// @Override +// public void handle(Signal signal) { +// log.warn("signal event {} {}", signal.getName(), signal.getNumber()); +// this.silenceDestroy(); +// } } diff --git a/modules/sub-plugin/db-h2/src/main/resources/sql/h2-db-v3.1.sql b/modules/sub-plugin/db-h2/src/main/resources/sql/h2-db-v3.1.sql index 24572530f..567ec9ce9 100644 --- a/modules/sub-plugin/db-h2/src/main/resources/sql/h2-db-v3.1.sql +++ b/modules/sub-plugin/db-h2/src/main/resources/sql/h2-db-v3.1.sql @@ -86,3 +86,9 @@ ALTER TABLE WORKSPACE_ENV_VAR ALTER TABLE WORKSPACE_ENV_VAR ADD IF NOT EXISTS privacy TINYINT DEFAULT 0 comment '隐私变量{1,隐私变量,0 非隐私变量(明文回显)}'; + + +ALTER TABLE SYSTEM_PARAMETERS + ALTER COLUMN id VARCHAR(100) COMMENT 'ID'; + +