mirror of
https://github.com/spring-cloud/spring-cloud-netflix.git
synced 2026-09-17 15:49:00 +00:00
Avoid cycle in getScheme().
This commit is contained in:
+3
-2
@@ -22,7 +22,6 @@ import java.util.Objects;
|
|||||||
|
|
||||||
import com.netflix.appinfo.InstanceInfo;
|
import com.netflix.appinfo.InstanceInfo;
|
||||||
|
|
||||||
import org.springframework.cloud.client.DefaultServiceInstance;
|
|
||||||
import org.springframework.cloud.client.ServiceInstance;
|
import org.springframework.cloud.client.ServiceInstance;
|
||||||
import org.springframework.core.style.ToStringCreator;
|
import org.springframework.core.style.ToStringCreator;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
@@ -81,7 +80,9 @@ public class EurekaServiceInstance implements ServiceInstance {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public URI getUri() {
|
public URI getUri() {
|
||||||
return DefaultServiceInstance.getUri(this);
|
String scheme = (isSecure()) ? "https" : "http";
|
||||||
|
String uri = String.format("%s://%s:%s", scheme, getHost(), getPort());
|
||||||
|
return URI.create(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user