From 90487d55409b8e22a4386bca1c51045dbc4638df Mon Sep 17 00:00:00 2001 From: aoshiguchen <1052045476@qq.com> Date: Tue, 14 Feb 2023 18:11:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=AF=E5=8A=A8=E5=8F=82=E6=95=B0=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proxy/client/core/LicenseObtainService.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/neutrino-proxy-client/src/main/java/fun/asgc/neutrino/proxy/client/core/LicenseObtainService.java b/neutrino-proxy-client/src/main/java/fun/asgc/neutrino/proxy/client/core/LicenseObtainService.java index 56998dfb..bd13fec6 100644 --- a/neutrino-proxy-client/src/main/java/fun/asgc/neutrino/proxy/client/core/LicenseObtainService.java +++ b/neutrino-proxy-client/src/main/java/fun/asgc/neutrino/proxy/client/core/LicenseObtainService.java @@ -114,7 +114,22 @@ public class LicenseObtainService { String config = FileUtil.readContentAsString("./.neutrino-proxy-client.json"); if (StringUtil.notEmpty(config)) { try { - customConfig = JSONObject.parseObject(config, CustomConfig.class); + CustomConfig tmp = JSONObject.parseObject(config, CustomConfig.class); + if (!StringUtil.isEmpty(tmp.getJksPath())) { + customConfig.setJksPath(tmp.getJksPath()); + } + if (!StringUtil.isEmpty(tmp.getServerIp())) { + customConfig.setServerIp(tmp.getServerIp()); + } + if (null != tmp.getServerPort()) { + customConfig.setServerPort(tmp.getServerPort()); + } + if (null != tmp.getSslEnable()) { + customConfig.setSslEnable(tmp.getSslEnable()); + } + if (!StringUtil.isEmpty(tmp.getLicenseKey())) { + customConfig.setLicenseKey(tmp.getLicenseKey()); + } } catch (Exception e) { log.error("file '.neutrino-proxy-client.json' config exception!", e); }