From f934b88a76e53f2da591ed9bbbeaa7408d18af99 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Fri, 17 Oct 2014 18:05:46 +0100 Subject: [PATCH] Ensure eureka client has a default zone with a serviceUrl --- docs/src/main/asciidoc/spring-cloud-netflix.adoc | 4 ++++ .../cloud/netflix/eureka/EurekaClientConfigBean.java | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/src/main/asciidoc/spring-cloud-netflix.adoc b/docs/src/main/asciidoc/spring-cloud-netflix.adoc index 48e42ae8..23e2ef92 100644 --- a/docs/src/main/asciidoc/spring-cloud-netflix.adoc +++ b/docs/src/main/asciidoc/spring-cloud-netflix.adoc @@ -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[] diff --git a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientConfigBean.java b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientConfigBean.java index ffc0c96d..935be584 100644 --- a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientConfigBean.java +++ b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientConfigBean.java @@ -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 { public List 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(","));