Refactoring serviceId to serviceName
This commit is contained in:
@@ -89,8 +89,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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user