Fix #65 for naming
This commit is contained in:
parent
413512661b
commit
0667224647
@ -38,6 +38,8 @@ import java.util.concurrent.TimeUnit;
|
||||
*/
|
||||
public class NamingProxy {
|
||||
|
||||
private static final int DEFAULT_SERVER_PORT = 8848;
|
||||
|
||||
private String namespace;
|
||||
|
||||
private String endpoint;
|
||||
@ -282,6 +284,10 @@ public class NamingProxy {
|
||||
|
||||
String url;
|
||||
|
||||
if (!curServer.contains(UtilAndComs.SERVER_ADDR_IP_SPLITER)) {
|
||||
curServer = curServer + UtilAndComs.SERVER_ADDR_IP_SPLITER + DEFAULT_SERVER_PORT;
|
||||
}
|
||||
|
||||
url = HttpClient.getPrefix() + curServer + api;
|
||||
|
||||
HttpClient.HttpResult result = HttpClient.request(url, headers, params, UtilAndComs.ENCODING, method);
|
||||
|
@ -43,4 +43,6 @@ public class UtilAndComs {
|
||||
public static final String NACOS_NAMING_LOG_NAME = "com.alibaba.nacos.naming.log.filename";
|
||||
|
||||
public static final String NACOS_NAMING_LOG_LEVEL = "com.alibaba.nacos.naming.log.level";
|
||||
|
||||
public static final String SERVER_ADDR_IP_SPLITER = ":";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user