the server address only support one ip #35

https://github.com/Tencent/spring-cloud-tencent/issues/35
pull/36/head
kupercheng 3 years ago
parent b7768182b5
commit 8aeeff441d

@ -65,16 +65,10 @@ public class PolarisContextConfiguration {
private List<String> getAddressList(String addressInfo) {
List<String> addressList = new ArrayList<>();
//if not contain ',' then set one ip
if (!properties.getAddress().contains(ADDRESS_SEPARATOR)) {
URI uri = URI.create(addressInfo.trim());
String[] addresses = addressInfo.split(ADDRESS_SEPARATOR);
for (String address : addresses) {
URI uri = URI.create(address.trim());
addressList.add(uri.getAuthority());
} else {
String[] addresses = addressInfo.split(ADDRESS_SEPARATOR);
for (String address : addresses) {
URI uri = URI.create(address.trim());
addressList.add(uri.getAuthority());
}
}
return addressList;
}

Loading…
Cancel
Save