public class DefaultServiceInstanceConverter extends Object implements ServiceInstanceConverter
ServiceInstances to Instances. To customize the health- or
management-url for all instances you can set healthEndpointPath or managementContextPath
respectively. If you want to influence the url per service you can add
management.context-path, management.port, management.address or health.path
to the instances metadata.| Constructor and Description |
|---|
DefaultServiceInstanceConverter() |
| Modifier and Type | Method and Description |
|---|---|
Registration |
convert(org.springframework.cloud.client.ServiceInstance instance)
Converts a service instance to a application instance to be registered.
|
String |
getHealthEndpointPath() |
protected URI |
getHealthUrl(org.springframework.cloud.client.ServiceInstance instance) |
String |
getManagementContextPath() |
protected URI |
getManagementUrl(org.springframework.cloud.client.ServiceInstance instance) |
protected Map<String,String> |
getMetadata(org.springframework.cloud.client.ServiceInstance instance) |
protected URI |
getServiceUrl(org.springframework.cloud.client.ServiceInstance instance) |
void |
setHealthEndpointPath(String healthEndpointPath) |
void |
setManagementContextPath(String managementContextPath) |
public Registration convert(org.springframework.cloud.client.ServiceInstance instance)
ServiceInstanceConverterconvert in interface ServiceInstanceConverterinstance - the service instance.protected URI getHealthUrl(org.springframework.cloud.client.ServiceInstance instance)
protected URI getManagementUrl(org.springframework.cloud.client.ServiceInstance instance)
protected URI getServiceUrl(org.springframework.cloud.client.ServiceInstance instance)
protected Map<String,String> getMetadata(org.springframework.cloud.client.ServiceInstance instance)
public void setManagementContextPath(String managementContextPath)
public String getManagementContextPath()
public void setHealthEndpointPath(String healthEndpointPath)
public String getHealthEndpointPath()
Copyright © 2018 codecentric AG. All rights reserved.