fix 修复非默认工作空间节点分发白名单无法保存问题

This commit is contained in:
bwcx_jzy 2022-03-28 10:58:03 +08:00
parent db0397d9a8
commit 90dac3c8ec
No known key found for this signature in database
GPG Key ID: 5E48E9372088B9E5
3 changed files with 21 additions and 16 deletions

View File

@ -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】修复非默认工作空间节点分发白名单无法保存问题感谢@愿好)
------

View File

@ -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();
// }
}

View File

@ -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';