客户端配置调整
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@
|
||||
*.class
|
||||
data.db*
|
||||
.neutrino-proxy.license
|
||||
.neutrino-proxy-client.config
|
||||
.neutrino-proxy-client.json
|
||||
lib/*
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"jksPath":"classpath:/test.jks",
|
||||
"licenseKey":"9495b00018fd4d2eac4d485a4c923b6d",
|
||||
"serverIp":"1.15.57.136",
|
||||
"serverPort":9002,
|
||||
"sslEnable":true
|
||||
}
|
||||
+4
-4
@@ -121,11 +121,11 @@ public class LicenseObtainService {
|
||||
customConfig.setLicenseKey(cliParams.get("licenseKey"));
|
||||
}
|
||||
if (StringUtil.notEmpty(customConfig.getLicenseKey())) {
|
||||
FileUtil.write("./.neutrino-proxy-client.config", JSONObject.toJSONString(customConfig, SerializerFeature.PrettyFormat));
|
||||
FileUtil.write("./.neutrino-proxy-client.json", JSONObject.toJSONString(customConfig, SerializerFeature.PrettyFormat));
|
||||
return customConfig;
|
||||
}
|
||||
|
||||
String config = FileUtil.readContentAsString("./.neutrino-proxy-client.config");
|
||||
String config = FileUtil.readContentAsString("./.neutrino-proxy-client.json");
|
||||
if (StringUtil.notEmpty(config)) {
|
||||
try {
|
||||
customConfig = JSONObject.parseObject(config, CustomConfig.class);
|
||||
@@ -133,7 +133,7 @@ public class LicenseObtainService {
|
||||
log.error("配置异常!", e);
|
||||
}
|
||||
if (StringUtil.notEmpty(customConfig.getLicenseKey())) {
|
||||
FileUtil.write("./.neutrino-proxy-client.config", JSONObject.toJSONString(customConfig, SerializerFeature.PrettyFormat));
|
||||
FileUtil.write("./.neutrino-proxy-client.json", JSONObject.toJSONString(customConfig, SerializerFeature.PrettyFormat));
|
||||
return customConfig;
|
||||
}
|
||||
}
|
||||
@@ -144,7 +144,7 @@ public class LicenseObtainService {
|
||||
license = scanner.next();
|
||||
}
|
||||
customConfig.setLicenseKey(license);
|
||||
FileUtil.write("./.neutrino-proxy-client.config", JSONObject.toJSONString(customConfig, SerializerFeature.PrettyFormat));
|
||||
FileUtil.write("./.neutrino-proxy-client.json", JSONObject.toJSONString(customConfig, SerializerFeature.PrettyFormat));
|
||||
|
||||
return customConfig;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user