From e8a4db66e0c3e8212ec62685f19ca94a7bef411b Mon Sep 17 00:00:00 2001 From: zhangzhiqiang Date: Wed, 18 Jan 2023 14:36:13 +0800 Subject: [PATCH] init --- .../src/main/java/org/nl/common/utils/InetAddUtil.java | 4 +--- .../java/org/nl/config/arthas/TunnelServerConfiguration.java | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/common/utils/InetAddUtil.java b/nladmin-system/nlsso-server/src/main/java/org/nl/common/utils/InetAddUtil.java index 4e1d4e4..0e81a45 100755 --- a/nladmin-system/nlsso-server/src/main/java/org/nl/common/utils/InetAddUtil.java +++ b/nladmin-system/nlsso-server/src/main/java/org/nl/common/utils/InetAddUtil.java @@ -89,8 +89,6 @@ public class InetAddUtil { && !address.isLinkLocalAddress() // filter 169.254.0.0/16 && !address.getHostAddress().contains(":");// filter IPv6 } - private final static Ip2regionSearcher IP_SEARCHER = SpringContextHolder.getBean(Ip2regionSearcher.class); - private static final UserAgentAnalyzer USER_AGENT_ANALYZER = UserAgentAnalyzer .newBuilder() @@ -245,7 +243,7 @@ public class InetAddUtil { * 根据ip获取详细地址 */ public static String getLocalCityInfo(String ip) { - IpInfo ipInfo = IP_SEARCHER.memorySearch(ip); + IpInfo ipInfo = SpringContextHolder.getBean(Ip2regionSearcher.class).memorySearch(ip); if(ipInfo != null){ return ipInfo.getAddress(); } diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/config/arthas/TunnelServerConfiguration.java b/nladmin-system/nlsso-server/src/main/java/org/nl/config/arthas/TunnelServerConfiguration.java index 9e7eef2..b77e7c3 100755 --- a/nladmin-system/nlsso-server/src/main/java/org/nl/config/arthas/TunnelServerConfiguration.java +++ b/nladmin-system/nlsso-server/src/main/java/org/nl/config/arthas/TunnelServerConfiguration.java @@ -32,7 +32,6 @@ public class TunnelServerConfiguration { tunnelServer.setPort(arthasProperties.getHttpPort()); tunnelServer.setSsl(false); tunnelServer.setPath(ArthasConstants.DEFAULT_WEBSOCKET_PATH); - tunnelServer.setClientConnectHost(InetAddUtil.getInetAddress()); if (tunnelClusterStore != null) { tunnelServer.setTunnelClusterStore(tunnelClusterStore);