Browse Source

Ensure eureka client has a default zone with a serviceUrl

pull/6/head
Dave Syer 10 years ago
parent
commit
f934b88a76
  1. 4
      docs/src/main/asciidoc/spring-cloud-netflix.adoc
  2. 3
      spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientConfigBean.java

4
docs/src/main/asciidoc/spring-cloud-netflix.adoc

@ -1,3 +1,7 @@ @@ -1,3 +1,7 @@
:github-tag: master
:github-repo: spring-cloud/spring-cloud-netflix
:github-raw: http://raw.github.com/{github-repo}/{github-tag}
:github-code: http://github.com/{github-repo}/tree/{github-tag}
= Spring Cloud Netflix
include::intro.adoc[]

3
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientConfigBean.java

@ -83,7 +83,6 @@ public class EurekaClientConfigBean implements EurekaClientConfig { @@ -83,7 +83,6 @@ public class EurekaClientConfigBean implements EurekaClientConfig {
{
serviceUrl.put(DEFAULT_ZONE, "http://localhost:8761/v2/");
serviceUrl.put("default", "http://localhost:8761/v2/");
}
private boolean gZipContent = true;
@ -154,7 +153,7 @@ public class EurekaClientConfigBean implements EurekaClientConfig { @@ -154,7 +153,7 @@ public class EurekaClientConfigBean implements EurekaClientConfig {
public List<String> getEurekaServerServiceUrls(String myZone) {
String serviceUrls = serviceUrl.get(myZone);
if (serviceUrls == null || serviceUrls.isEmpty()) {
serviceUrls = serviceUrl.get("default");
serviceUrls = serviceUrl.get(DEFAULT_ZONE);
}
if (serviceUrls != null) {
return Arrays.asList(serviceUrls.split(","));

Loading…
Cancel
Save