@Configuration
@ConditionalOnProperty(value="spring.cloud.consul.discovery.enabled",
matchIfMissing=true)
@EnableConfigurationProperties
@AutoConfigureBefore(value={org.springframework.cloud.client.discovery.simple.SimpleDiscoveryClientAutoConfiguration.class,org.springframework.cloud.client.CommonsClientAutoConfiguration.class})
public class ConsulDiscoveryClientConfiguration
extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CATALOG_WATCH_TASK_SCHEDULER_NAME |
| Constructor and Description |
|---|
ConsulDiscoveryClientConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.scheduling.TaskScheduler |
catalogWatchTaskScheduler() |
ConsulCatalogWatch |
consulCatalogWatch(ConsulDiscoveryProperties discoveryProperties,
org.springframework.scheduling.TaskScheduler taskScheduler) |
ConsulDiscoveryClient |
consulDiscoveryClient(ConsulDiscoveryProperties discoveryProperties) |
ConsulDiscoveryProperties |
consulDiscoveryProperties(org.springframework.cloud.commons.util.InetUtils inetUtils) |
HeartbeatProperties |
heartbeatProperties() |
TtlScheduler |
ttlScheduler(HeartbeatProperties heartbeatProperties) |
public static final String CATALOG_WATCH_TASK_SCHEDULER_NAME
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(value="spring.cloud.consul.discovery.heartbeat.enabled") public TtlScheduler ttlScheduler(HeartbeatProperties heartbeatProperties)
@Bean public HeartbeatProperties heartbeatProperties()
@Bean public ConsulDiscoveryProperties consulDiscoveryProperties(org.springframework.cloud.commons.util.InetUtils inetUtils)
@Bean @ConditionalOnMissingBean public ConsulDiscoveryClient consulDiscoveryClient(ConsulDiscoveryProperties discoveryProperties)
@Bean
@ConditionalOnMissingBean
@ConditionalOnProperty(name="spring.cloud.consul.discovery.catalog-services-watch.enabled",
matchIfMissing=true)
public ConsulCatalogWatch consulCatalogWatch(ConsulDiscoveryProperties discoveryProperties,
@Qualifier(value="catalogWatchTaskScheduler")
org.springframework.scheduling.TaskScheduler taskScheduler)
@Bean(name="catalogWatchTaskScheduler")
@ConditionalOnProperty(name="spring.cloud.consul.discovery.catalog-services-watch.enabled",
matchIfMissing=true)
public org.springframework.scheduling.TaskScheduler catalogWatchTaskScheduler()
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.