Merge pull request #266 from yangzhiw/issue_264

fix Nacos ConfigService can not found
pull/277/head
小马哥 3 years ago committed by GitHub
commit b9d8c10de9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,8 +17,8 @@
package cn.hippo4j.core.springboot.starter.refresher; package cn.hippo4j.core.springboot.starter.refresher;
import cn.hippo4j.common.config.ApplicationContextHolder;
import cn.hippo4j.core.springboot.starter.config.BootstrapCoreProperties; 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.ConfigService;
import com.alibaba.nacos.api.config.listener.Listener; import com.alibaba.nacos.api.config.listener.Listener;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -35,11 +35,11 @@ import java.util.concurrent.Executor;
@Slf4j @Slf4j
public class NacosRefresherHandler extends AbstractCoreThreadPoolDynamicRefresh { public class NacosRefresherHandler extends AbstractCoreThreadPoolDynamicRefresh {
private final ConfigService configService; @NacosInjected
private ConfigService configService;
public NacosRefresherHandler(BootstrapCoreProperties bootstrapCoreProperties) { public NacosRefresherHandler(BootstrapCoreProperties bootstrapCoreProperties) {
super(bootstrapCoreProperties); super(bootstrapCoreProperties);
configService = ApplicationContextHolder.getBean(ConfigService.class);
} }
@Override @Override

Loading…
Cancel
Save