From 04cdd18eda117949ae2919ce5144ad5dd2def9f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B1=9F=E9=BE=99?= Date: Wed, 15 Jun 2022 17:44:11 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat(=E6=96=B0=E5=A2=9Ebanner=E9=85=8D?= =?UTF-8?q?=E7=BD=AE):=20=E6=96=B0=E5=A2=9Ebanner=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增banner配置 --- .../config/DynamicThreadPoolCoreAutoConfiguration.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/springboot/starter/config/DynamicThreadPoolCoreAutoConfiguration.java b/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/springboot/starter/config/DynamicThreadPoolCoreAutoConfiguration.java index 360a2846..0ccd107b 100644 --- a/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/springboot/starter/config/DynamicThreadPoolCoreAutoConfiguration.java +++ b/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/springboot/starter/config/DynamicThreadPoolCoreAutoConfiguration.java @@ -31,6 +31,7 @@ import cn.hippo4j.core.config.WebThreadPoolConfiguration; import cn.hippo4j.core.enable.MarkerConfiguration; import cn.hippo4j.core.executor.ThreadPoolNotifyAlarmHandler; import cn.hippo4j.core.executor.state.ThreadPoolRunStateHandler; +import cn.hippo4j.core.handler.DynamicThreadPoolBannerHandler; import cn.hippo4j.core.springboot.starter.monitor.DynamicThreadPoolMonitorExecutor; import cn.hippo4j.core.springboot.starter.monitor.LogMonitorHandler; import cn.hippo4j.core.springboot.starter.monitor.MetricMonitorHandler; @@ -194,4 +195,9 @@ public class DynamicThreadPoolCoreAutoConfiguration { public ThreadPoolAdapterRegister threadPoolAdapterRegister() { return new ThreadPoolAdapterRegister(bootstrapCoreProperties); } + + @Bean + public DynamicThreadPoolBannerHandler threadPoolBannerHandler() { + return new DynamicThreadPoolBannerHandler(bootstrapCoreProperties); + } } From 891f4b15466913543d33884023c5355cf1da7791 Mon Sep 17 00:00:00 2001 From: janey668 Date: Wed, 15 Jun 2022 18:26:46 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat(=E6=96=B0=E5=A2=9Ebanner=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=B3=A8=E9=87=8A):=20=E6=96=B0=E5=A2=9Ebanner?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增banner配置注释 --- .../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/springboot/starter/config/DynamicThreadPoolCoreAutoConfiguration.java b/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/springboot/starter/config/DynamicThreadPoolCoreAutoConfiguration.java index 0ccd107b..c77dd5b9 100644 --- a/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/springboot/starter/config/DynamicThreadPoolCoreAutoConfiguration.java +++ b/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/springboot/starter/config/DynamicThreadPoolCoreAutoConfiguration.java @@ -196,6 +196,10 @@ public class DynamicThreadPoolCoreAutoConfiguration { return new ThreadPoolAdapterRegister(bootstrapCoreProperties); } + /** + * banner config + * @return DynamicThreadPoolBannerHandler + */ @Bean public DynamicThreadPoolBannerHandler threadPoolBannerHandler() { return new DynamicThreadPoolBannerHandler(bootstrapCoreProperties); From 5e691dba4a71b3ba6cf1cc5fa81077bdeefb9bed Mon Sep 17 00:00:00 2001 From: yangzhiw Date: Thu, 16 Jun 2022 15:08:42 +0800 Subject: [PATCH 3/3] fix Nacos ConfigService can not found --- .../springboot/starter/refresher/NacosRefresherHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/springboot/starter/refresher/NacosRefresherHandler.java b/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/springboot/starter/refresher/NacosRefresherHandler.java index edae7da4..100708c0 100644 --- a/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/springboot/starter/refresher/NacosRefresherHandler.java +++ b/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/springboot/starter/refresher/NacosRefresherHandler.java @@ -17,8 +17,8 @@ package cn.hippo4j.core.springboot.starter.refresher; -import cn.hippo4j.common.config.ApplicationContextHolder; import cn.hippo4j.core.springboot.starter.config.BootstrapCoreProperties; +import com.alibaba.nacos.api.annotation.NacosInjected; import com.alibaba.nacos.api.config.ConfigService; import com.alibaba.nacos.api.config.listener.Listener; import lombok.extern.slf4j.Slf4j; @@ -35,11 +35,11 @@ import java.util.concurrent.Executor; @Slf4j public class NacosRefresherHandler extends AbstractCoreThreadPoolDynamicRefresh { - private final ConfigService configService; + @NacosInjected + private ConfigService configService; public NacosRefresherHandler(BootstrapCoreProperties bootstrapCoreProperties) { super(bootstrapCoreProperties); - configService = ApplicationContextHolder.getBean(ConfigService.class); } @Override