Merge pull request #131 from split3/feature/service-name-refactor

Refactoring serviceId to serviceName
This commit is contained in:
Spencer Gibb
2016-01-20 15:55:33 -07:00
3 changed files with 4 additions and 4 deletions

View File

@@ -91,8 +91,8 @@ public class ConsulDiscoveryProperties {
private int catalogServicesWatchTimeout = 2;
/** Unique service id */
private String serviceId;
/** Service name */
private String serviceName;
/** Unique service instance id */
private String instanceId;

View File

@@ -185,7 +185,7 @@ public class ConsulLifecycle extends AbstractDiscoveryLifecycle {
@Override
protected String getAppName() {
String appName = properties.getServiceId();
String appName = properties.getServiceName();
return StringUtils.isEmpty(appName) ? super.getAppName() : appName;
}

View File

@@ -44,7 +44,7 @@ import com.ecwid.consul.v1.agent.model.Service;
@SpringApplicationConfiguration(classes = TestPropsConfig.class)
@WebIntegrationTest(value = { "spring.application.name=myTestService",
"spring.cloud.consul.discovery.instanceId=myTestService1",
"spring.cloud.consul.discovery.serviceId=myprefix-${spring.application.name}"}, randomPort = true)
"spring.cloud.consul.discovery.serviceName=myprefix-${spring.application.name}"}, randomPort = true)
public class ConsulLifecycleCustomizedServiceNameTests {
@Autowired