diff --git a/spring-cloud-cloudfoundry-connector/src/main/java/org/springframework/cloud/cloudfoundry/MysqlServiceInfoCreator.java b/spring-cloud-cloudfoundry-connector/src/main/java/org/springframework/cloud/cloudfoundry/MysqlServiceInfoCreator.java index aca803e..b5c6e15 100644 --- a/spring-cloud-cloudfoundry-connector/src/main/java/org/springframework/cloud/cloudfoundry/MysqlServiceInfoCreator.java +++ b/spring-cloud-cloudfoundry-connector/src/main/java/org/springframework/cloud/cloudfoundry/MysqlServiceInfoCreator.java @@ -3,14 +3,15 @@ package org.springframework.cloud.cloudfoundry; import org.springframework.cloud.service.common.MysqlServiceInfo; /** - * + * * @author Ramnivas Laddad * */ public class MysqlServiceInfoCreator extends RelationalServiceInfoCreator { public MysqlServiceInfoCreator() { - super(new Tags("mysql"), "mysql"); + // the literal in the tag is CloudFoundry-specific + super(new Tags("mysql"), MysqlServiceInfo.URI_SCHEME); } @Override diff --git a/spring-cloud-core/src/main/java/org/springframework/cloud/service/common/MysqlServiceInfo.java b/spring-cloud-core/src/main/java/org/springframework/cloud/service/common/MysqlServiceInfo.java index 467a59c..2eccab0 100644 --- a/spring-cloud-core/src/main/java/org/springframework/cloud/service/common/MysqlServiceInfo.java +++ b/spring-cloud-core/src/main/java/org/springframework/cloud/service/common/MysqlServiceInfo.java @@ -3,14 +3,16 @@ package org.springframework.cloud.service.common; import org.springframework.cloud.service.ServiceInfo.ServiceLabel; /** - * + * * @author Ramnivas Laddad * */ @ServiceLabel("mysql") public class MysqlServiceInfo extends RelationalServiceInfo { + public static final String URI_SCHEME = "mysql"; + public MysqlServiceInfo(String id, String url) { - super(id, url, "mysql"); + super(id, url, URI_SCHEME); } } diff --git a/spring-cloud-heroku-connector/src/main/java/org/springframework/cloud/heroku/MysqlServiceInfoCreator.java b/spring-cloud-heroku-connector/src/main/java/org/springframework/cloud/heroku/MysqlServiceInfoCreator.java index 4318cb0..73bb8eb 100644 --- a/spring-cloud-heroku-connector/src/main/java/org/springframework/cloud/heroku/MysqlServiceInfoCreator.java +++ b/spring-cloud-heroku-connector/src/main/java/org/springframework/cloud/heroku/MysqlServiceInfoCreator.java @@ -3,14 +3,14 @@ package org.springframework.cloud.heroku; import org.springframework.cloud.service.common.MysqlServiceInfo; /** - * + * * @author Ramnivas Laddad * */ public class MysqlServiceInfoCreator extends RelationalServiceInfoCreator { public MysqlServiceInfoCreator() { - super("mysql"); + super(MysqlServiceInfo.URI_SCHEME); } @Override diff --git a/spring-cloud-heroku-connector/src/test/java/org/springframework/cloud/heroku/HerokuConnectorMysqlServiceTest.java b/spring-cloud-heroku-connector/src/test/java/org/springframework/cloud/heroku/HerokuConnectorMysqlServiceTest.java index 349c738..439a854 100644 --- a/spring-cloud-heroku-connector/src/test/java/org/springframework/cloud/heroku/HerokuConnectorMysqlServiceTest.java +++ b/spring-cloud-heroku-connector/src/test/java/org/springframework/cloud/heroku/HerokuConnectorMysqlServiceTest.java @@ -13,15 +13,15 @@ import org.springframework.cloud.service.ServiceInfo; import org.springframework.cloud.service.common.MysqlServiceInfo; /** - * + * * @author Ramnivas Laddad * */ public class HerokuConnectorMysqlServiceTest extends AbstractHerokuConnectorRelationalServiceTest { public HerokuConnectorMysqlServiceTest() { - super("mysql"); + super(MysqlServiceInfo.URI_SCHEME); } - + @Test public void mysqlServiceCreation() { Map env = new HashMap();