From 5e691dba4a71b3ba6cf1cc5fa81077bdeefb9bed Mon Sep 17 00:00:00 2001 From: yangzhiw Date: Thu, 16 Jun 2022 15:08:42 +0800 Subject: [PATCH] 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