From a817f7d0351ee22e7f3a7732689653dd5c1dc17c Mon Sep 17 00:00:00 2001 From: gewuwo Date: Mon, 25 Apr 2022 13:57:17 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E6=B7=BB=E5=8A=A0@ConditionalOnMissing?= =?UTF-8?q?Class=EF=BC=8C=E9=80=9A=E8=BF=87=E5=AE=9E=E9=99=85=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=9D=A5=E5=8A=A0=E8=BD=BDbean=EF=BC=8C=E4=BB=85?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=AD=98=E5=9C=A8=E5=AF=B9=E5=BA=94=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=9A=84bean.=20(#201)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/DynamicThreadPoolCoreAutoConfiguration.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/starter/config/DynamicThreadPoolCoreAutoConfiguration.java b/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/starter/config/DynamicThreadPoolCoreAutoConfiguration.java index 8f522a24..553c1ed2 100644 --- a/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/starter/config/DynamicThreadPoolCoreAutoConfiguration.java +++ b/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/starter/config/DynamicThreadPoolCoreAutoConfiguration.java @@ -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); }