启动参数调整

This commit is contained in:
aoshiguchen
2023-02-14 18:11:49 +08:00
parent e7b2c17a35
commit 90487d5540
@@ -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);
}