1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

Update NacosDiscoveryProperties.java

当配置属性cloud.nacos.discovery.server-addr以 '/' 结束会造成服务提供方无法注册到NacosServer
This commit is contained in:
carlWangTao 2019-02-12 09:51:40 +08:00 committed by GitHub
parent e7b4a08f44
commit 8d44c7ee01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,6 +149,9 @@ public class NacosDiscoveryProperties {
} }
serverAddr = Objects.toString(serverAddr, ""); serverAddr = Objects.toString(serverAddr, "");
if(serverAddr.lastIndexOf("/") != -1) {
serverAddr.substring(0,serverAddr.length()-1);
}
endpoint = Objects.toString(endpoint, ""); endpoint = Objects.toString(endpoint, "");
namespace = Objects.toString(namespace, ""); namespace = Objects.toString(namespace, "");
logName = Objects.toString(logName, ""); logName = Objects.toString(logName, "");