add comma division with some case to use
This commit is contained in:
parent
3bd5dcb1cf
commit
a6deeb1fed
@ -163,5 +163,4 @@ public class Constants {
|
||||
|
||||
public static final String NUMBER_PATTERN = "^\\d+$";
|
||||
|
||||
public static final String COMMA_DIVISION = ",";
|
||||
}
|
||||
|
@ -57,4 +57,5 @@ public interface Constants {
|
||||
String PREFER_HOSTNAME_OVER_IP = "nacos.inetutils.prefer-hostname-over-ip";
|
||||
String SYSTEM_PREFER_HOSTNAME_OVER_IP = "nacos.preferHostnameOverIp";
|
||||
String WEN_CONTEXT_PATH = "server.servlet.context-path";
|
||||
String COMMA_DIVISION = ",";
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ public class SystemUtils {
|
||||
int multiIndex = instance.indexOf(",");
|
||||
if (multiIndex > 0) {
|
||||
// support the format: ip1:port,ip2:port # multi inline
|
||||
for (String ins : instance.split("[,]")) {
|
||||
for (String ins : instance.split(Constants.COMMA_DIVISION)) {
|
||||
instanceList.add(ins);
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user