代理服务配置优化

This commit is contained in:
QAIU
2025-01-04 17:38:33 +08:00
parent d91460d2e2
commit 594010ba88
2 changed files with 18 additions and 8 deletions

View File

@@ -44,24 +44,24 @@ public class AppMain {
if (jsonObject.containsKey(ConfigConstant.CACHE)) {
CacheConfigLoader.init(jsonObject.getJsonObject(ConfigConstant.CACHE));
}
LocalMap<Object, Object> localMap = VertxHolder.getVertxInstance().sharedData().getLocalMap(LOCAL);
// 代理
if (jsonObject.containsKey(ConfigConstant.PROXY)) {
LocalMap<Object, Object> localMap = VertxHolder.getVertxInstance().sharedData().getLocalMap(LOCAL);
JsonArray proxyJsonArray = jsonObject.getJsonArray(ConfigConstant.PROXY);
if (proxyJsonArray != null) {
JsonObject jsonObject1 = new JsonObject();
proxyJsonArray.forEach(proxyJson -> {
String panTypes = ((JsonObject)proxyJson).getString("panTypes");
if (!panTypes.isEmpty()) {
JsonObject jsonObject1 = new JsonObject();
for (String s : panTypes.split(",")) {
jsonObject1.put(s, proxyJson);
}
localMap.put("proxy", jsonObject1);
}
});
localMap.put("proxy", jsonObject1);
}
}
}
}