Spring Cloud Alibaba 综合集成架构演示,含答案解析
@Configuration
public class AlibabaConfig {
@Bean
public RestTemplate restTemplate(RestTemplateBuilder builder) {
return builder.build();
}
@Bean
public SentinelResourceAspect sentinelResourceAspect() {
return new SentinelResourceAspect();
}
@Bean
public SentinelRestTemplate sentinelRestTemplate(RestTemplate restTemplate) {
return new SentinelRestTemplate(restTemplate);
}
@Bean
public NacosDiscoveryProperties nacosDiscoveryProperties() {
return new NacosDiscoveryProperties();
}
@Bean
public NacosServiceRegistry nacosServiceRegistry() {
return new NacosServiceRegistry();
}
@Bean
public NacosWatch nacosWatch() {
return new NacosWatch();
}
@Bean
public NacosDiscovery nacosDiscovery() {
return new NacosDiscovery();
}
@Bean
public NacosConfigProperties nacosConfigProperties() {
return new NacosConfigProperties();
}
@Bean
public NacosConfigService nacosConfigService() {
return new NacosConfigService();
}
@Bean
public NacosConfig nacosConfig() {
return new NacosConfig();
}
@Bean
public NacosConfigManager nacosConfigManager() {
return new NacosConfigManager();
}
@Bean
public NacosConfigListener nacosConfigListener() {
return new NacosConfigListener();
}
@Bean
public NacosConfigAutoConfiguration nacosConfigAutoConfiguration() {
return new NacosConfigAutoConfiguration();
}
@Bean
public NacosServiceAutoServiceRegistration nacosServiceAutoServiceRegistration() {
return new NacosServiceAutoServiceRegistration();
}
@Bean
public NacosServiceRegistryAutoConfiguration nacosServiceRegistryAutoConfiguration() {
return new NacosServiceRegistryAutoConfiguration();
}
@Bean
public NacosDiscoveryAutoConfiguration nacosDiscoveryAutoConfiguration() {
return new NacosDiscoveryAutoConfiguration();
}
@Bean
public NacosContextRefresher nacosContextRefresher() {
return new NacosContextRefresher();
}
@Bean
public NacosRefreshHistory nacosRefreshHistory() {
return new NacosRefreshHistory();
}
@Bean
public NacosRefreshHistoryRepository nacosRefreshHistoryRepository() {
return new NacosRefreshHistoryRepository();
评论已关闭