diff --git a/starters/threadpool/config/src/main/java/cn/hippo4j/config/springboot/starter/refresher/EtcdRefresherHandler.java b/starters/threadpool/config/src/main/java/cn/hippo4j/config/springboot/starter/refresher/EtcdRefresherHandler.java index 2606493850..7620f0e9a0 100644 --- a/starters/threadpool/config/src/main/java/cn/hippo4j/config/springboot/starter/refresher/EtcdRefresherHandler.java +++ b/starters/threadpool/config/src/main/java/cn/hippo4j/config/springboot/starter/refresher/EtcdRefresherHandler.java @@ -17,7 +17,6 @@ package cn.hippo4j.config.springboot.starter.refresher; -import cn.hippo4j.common.toolkit.JSONUtil; import cn.hippo4j.common.toolkit.StringUtil; import cn.hippo4j.threadpool.dynamic.mode.config.properties.BootstrapConfigProperties; import io.etcd.jetcd.ByteSequence; @@ -65,7 +64,7 @@ public void registerListener() { String key = etcd.get(KEY); Charset charset = StringUtil.isBlank(etcd.get(CHARSET)) ? StandardCharsets.UTF_8 : Charset.forName(etcd.get(CHARSET)); initClient(etcd, charset); - // TODO Currently only supports json + GetResponse getResponse = client.getKVClient().get(ByteSequence.from(key, charset)).get(); KeyValue keyValue = getResponse.getKvs().get(0); if (Objects.isNull(keyValue)) { @@ -103,7 +102,7 @@ public void onCompleted() { * @param charset charset */ private void initClient(Map etcd, Charset charset) { - // TODO + if (Objects.isNull(client)) { String user = etcd.get(USER); String password = etcd.get(PASSWORD);