Spring Cloud 系列文章之七:Spring Cloud Config 与 Spring Cloud Bus 的结合使用
@Configuration
@Profile("full")
@EnableConfigServer
@EnableCircuitBreaker
public class FullConfiguration {
@Bean
public DiscoveryClientRouteLocator discoveryClientRouteLocator(DiscoveryClient discoveryClient, DiscoveryLocatorProperties properties) {
return new DiscoveryClientRouteLocator("/", discoveryClient, properties);
}
@Bean
public ConfigServerInstanceProvider instanceProvider(DiscoveryClient discoveryClient) {
return new ConfigServerInstanceProvider(discoveryClient);
}
@Bean
public ConfigServerHealthIndicator healthIndicator(ConfigServerInstanceProvider provider) {
return new ConfigServerHealthIndicator(provider);
}
@Bean
public ConfigServerInstanceMonitor monitor(ConfigServerInstanceProvider provider) {
return new ConfigServerInstanceMonitor(provider, 5000);
}
@Bean
public ConfigServerInstanceMonitorWrapper monitorWrapper(ConfigServerInstanceMonitor monitor) {
return new ConfigServerInstanceMonitorWrapper(monitor);
}
@Bean
public ConfigServerInstanceWrapper instanceWrapper(ConfigServerInstanceProvider provider) {
return new ConfigServerInstanceWrapper(provider);
}
@Bean
public ConfigServerInstanceWrapperWrapper instanceWrapperWrapper(ConfigServerInstanceWrapper wrapper) {
return new ConfigServerInstanceWrapperWrapper(wrapper);
}
@Bean
public ConfigServerInstanceWrapperWrapperWrapper instanceWrapperWrapperWrapper(ConfigServerInstanceWrapperWrapper wrapper) {
return new ConfigServerInstanceWrapperWrapperWrapper(wrapper);
}
@Bean
public ConfigServerInstanceWrapperWrapperWrapperWrapper instanceWrapperWrapperWrapperWrapper(ConfigServerInstanceWrapperWrapperWrapper wrapper) {
return new ConfigServerInstanceWrapperWrapperWrapperWrapper(wrapper);
}
@Bean
public ConfigServerInstanceWrapperWrapperWrapperWrapperWrapper instanceWrapperWrapperWrapperWrapperWrapper(ConfigServerInstanceWrapperWrapperWrapperWrapper wrapper) {
return new ConfigServerInstanceWrapperWrapperWrapperWrapperWrapper(wrapper);
}
@Bean
public ConfigServerInstanceWrapperWrapperWrapperWrapperWrapperWrapper instanceWrapperWrapperWrapperWrapperWrapperWrapperWrapper(ConfigServerInstanceWrapperWrapperWrapp
评论已关闭