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