Merge pull request #202 from gewuwo/develop

close #201 : 项目中同时拥有nacso、zk依赖,默认会加载nacos和zk的RefresherHandler,导致启动报错
pull/203/head
龙台 Long Tai 3 years ago committed by GitHub
commit 105a957d24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -109,24 +109,28 @@ public class DynamicThreadPoolCoreAutoConfiguration {
@Bean
@ConditionalOnClass(name = NACOS_CONFIG_KEY)
@ConditionalOnMissingClass(NACOS_CONFIG_MANAGER_KEY)
@ConditionalOnProperty(prefix = BootstrapCoreProperties.PREFIX, name = "nacos")
public NacosRefresherHandler nacosRefresherHandler(ThreadPoolNotifyAlarmHandler threadPoolNotifyAlarmHandler) {
return new NacosRefresherHandler(threadPoolNotifyAlarmHandler, bootstrapCoreProperties);
}
@Bean
@ConditionalOnClass(name = NACOS_CONFIG_MANAGER_KEY)
@ConditionalOnProperty(prefix = BootstrapCoreProperties.PREFIX, name = "nacos")
public NacosCloudRefresherHandler nacosCloudRefresherHandler(ThreadPoolNotifyAlarmHandler threadPoolNotifyAlarmHandler) {
return new NacosCloudRefresherHandler(threadPoolNotifyAlarmHandler, bootstrapCoreProperties);
}
@Bean
@ConditionalOnClass(name = APOLLO_CONFIG_KEY)
@ConditionalOnProperty(prefix = BootstrapCoreProperties.PREFIX, name = "apollo")
public ApolloRefresherHandler apolloRefresher(ThreadPoolNotifyAlarmHandler threadPoolNotifyAlarmHandler) {
return new ApolloRefresherHandler(threadPoolNotifyAlarmHandler, bootstrapCoreProperties);
}
@Bean
@ConditionalOnClass(name = ZK_CONFIG_KEY)
@ConditionalOnProperty(prefix = BootstrapCoreProperties.PREFIX, name = "zookeeper")
public ZookeeperRefresherHandler zookeeperRefresher(ThreadPoolNotifyAlarmHandler threadPoolNotifyAlarmHandler) {
return new ZookeeperRefresherHandler(threadPoolNotifyAlarmHandler, bootstrapCoreProperties);
}

Loading…
Cancel
Save