mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-12-02 11:58:01 +08:00
fix 修复非默认工作空间节点分发白名单无法保存问题
This commit is contained in:
parent
db0397d9a8
commit
90dac3c8ec
@ -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】修复非默认工作空间节点分发白名单无法保存问题(感谢@愿好)
|
||||
|
||||
------
|
||||
|
||||
|
@ -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();
|
||||
// }
|
||||
}
|
||||
|
@ -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';
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user