mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
Code Style
This commit is contained in:
parent
a1f4ab0c4d
commit
9e708b1c1c
@ -67,7 +67,8 @@ public class SidecarHealthChecker {
|
||||
instanceCache(applicationName, ip, port, status);
|
||||
if (status.equals(Status.UP)) {
|
||||
if (needRegister(applicationName, ip, port, status)) {
|
||||
this.sidecarDiscoveryClient.registerInstance(applicationName, ip, port);
|
||||
this.sidecarDiscoveryClient.registerInstance(applicationName, ip,
|
||||
port);
|
||||
log.info(
|
||||
"Polyglot service changed and Health check success. register the new instance. applicationName = {}, ip = {}, port = {}, status = {}",
|
||||
applicationName, ip, port, status);
|
||||
|
@ -55,4 +55,5 @@ public class SidecarNacosAutoConfiguration {
|
||||
return new SidecarNacosDiscoveryClient(nacosServiceManager,
|
||||
sidecarNacosDiscoveryProperties);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -66,4 +66,5 @@ public class SidecarNacosDiscoveryClient implements SidecarDiscoveryClient {
|
||||
return nacosServiceManager
|
||||
.getNamingService(sidecarNacosDiscoveryProperties.getNacosProperties());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package com.alibaba.cloud.sidecar.nacos;
|
||||
|
||||
import com.alibaba.cloud.nacos.NacosDiscoveryProperties;
|
||||
import com.alibaba.cloud.sidecar.SidecarProperties;
|
||||
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
|
@ -108,9 +108,9 @@ public class DubboServiceRegistrationNonWebApplicationAutoConfiguration {
|
||||
for (List<URL> urls : repository.getAllExportedUrls().values()) {
|
||||
urls.stream().filter(
|
||||
url -> REST_PROTOCOL.equalsIgnoreCase(url.getProtocol()))
|
||||
.findFirst().ifPresent(url -> {
|
||||
serverPort = url.getPort();
|
||||
});
|
||||
.findFirst().ifPresent(url -> {
|
||||
serverPort = url.getPort();
|
||||
});
|
||||
|
||||
// If REST protocol is not present, use any applied port.
|
||||
if (serverPort == null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user