diff --git a/spring-cloud-cloudfoundry-connector/src/main/java/org/springframework/cloud/cloudfoundry/RedisServiceInfoCreator.java b/spring-cloud-cloudfoundry-connector/src/main/java/org/springframework/cloud/cloudfoundry/RedisServiceInfoCreator.java index 75e6df1..f8fcfa3 100644 --- a/spring-cloud-cloudfoundry-connector/src/main/java/org/springframework/cloud/cloudfoundry/RedisServiceInfoCreator.java +++ b/spring-cloud-cloudfoundry-connector/src/main/java/org/springframework/cloud/cloudfoundry/RedisServiceInfoCreator.java @@ -12,7 +12,8 @@ import org.springframework.cloud.service.common.RedisServiceInfo; public class RedisServiceInfoCreator extends CloudFoundryServiceInfoCreator { public RedisServiceInfoCreator() { - super(new Tags("redis"), "redis"); + // the literal in the tag is CloudFoundry-specific + super(new Tags("redis"), RedisServiceInfo.URI_SCHEME); } public RedisServiceInfo createServiceInfo(Map serviceData) { diff --git a/spring-cloud-core/src/main/java/org/springframework/cloud/service/common/RedisServiceInfo.java b/spring-cloud-core/src/main/java/org/springframework/cloud/service/common/RedisServiceInfo.java index d31be25..ab35a8e 100644 --- a/spring-cloud-core/src/main/java/org/springframework/cloud/service/common/RedisServiceInfo.java +++ b/spring-cloud-core/src/main/java/org/springframework/cloud/service/common/RedisServiceInfo.java @@ -4,16 +4,19 @@ import org.springframework.cloud.service.UriBasedServiceInfo; import org.springframework.cloud.service.ServiceInfo.ServiceLabel; /** - * + * * @author Ramnivas Laddad * */ @ServiceLabel("redis") public class RedisServiceInfo extends UriBasedServiceInfo { + + public static final String URI_SCHEME = "redis"; + public RedisServiceInfo(String id, String host, int port, String password) { - super(id, "redis", host, port, null, password, null); + super(id, URI_SCHEME, host, port, null, password, null); } - + public RedisServiceInfo(String id, String uri) { super(id, uri); } diff --git a/spring-cloud-heroku-connector/src/main/java/org/springframework/cloud/heroku/RedisServiceInfoCreator.java b/spring-cloud-heroku-connector/src/main/java/org/springframework/cloud/heroku/RedisServiceInfoCreator.java index cfa88ad..1757bd7 100644 --- a/spring-cloud-heroku-connector/src/main/java/org/springframework/cloud/heroku/RedisServiceInfoCreator.java +++ b/spring-cloud-heroku-connector/src/main/java/org/springframework/cloud/heroku/RedisServiceInfoCreator.java @@ -3,14 +3,14 @@ package org.springframework.cloud.heroku; import org.springframework.cloud.service.common.RedisServiceInfo; /** - * + * * @author Ramnivas Laddad * */ public class RedisServiceInfoCreator extends HerokuServiceInfoCreator { public RedisServiceInfoCreator() { - super("redis"); + super(RedisServiceInfo.URI_SCHEME); } @Override