enhancement #I5X1O6 提升安全性,更新不安全的第三方依赖
This commit is contained in:
parent
da65b72113
commit
676e974c91
|
@ -46,5 +46,9 @@
|
|||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>QLExpress</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -23,12 +23,6 @@
|
|||
<dependency>
|
||||
<groupId>io.etcd</groupId>
|
||||
<artifactId>jetcd-core</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>jetcd-grpc</artifactId>
|
||||
<groupId>io.etcd</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
|
|
|
@ -25,7 +25,7 @@ public class EtcdClient {
|
|||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(EtcdClient.class);
|
||||
|
||||
private Client client;
|
||||
private final Client client;
|
||||
|
||||
private final ConcurrentHashMap<String, Watch.Watcher> watchCache = new ConcurrentHashMap<>();
|
||||
|
||||
|
|
|
@ -6,6 +6,9 @@ import com.yomahub.liteflow.parser.zk.exception.ZkException;
|
|||
import com.yomahub.liteflow.parser.zk.vo.ZkParserVO;
|
||||
import org.apache.curator.framework.CuratorFramework;
|
||||
import org.apache.curator.framework.CuratorFrameworkFactory;
|
||||
import org.apache.curator.framework.recipes.cache.ChildData;
|
||||
import org.apache.curator.framework.recipes.cache.CuratorCache;
|
||||
import org.apache.curator.framework.recipes.cache.CuratorCacheListener;
|
||||
import org.apache.curator.framework.recipes.cache.NodeCache;
|
||||
import org.apache.curator.retry.RetryNTimes;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -65,15 +68,15 @@ public class ZkParserHelper {
|
|||
/**
|
||||
* 监听 zk 节点
|
||||
*/
|
||||
public void listenZkNode() throws Exception {
|
||||
final NodeCache cache = new NodeCache(client, zkParserVO.getNodePath());
|
||||
public void listenZkNode() {
|
||||
CuratorCache cache = CuratorCache.build(client, zkParserVO.getNodePath());
|
||||
|
||||
cache.start();
|
||||
|
||||
cache.getListenable().addListener(() -> {
|
||||
String content1 = new String(cache.getCurrentData().getData());
|
||||
cache.listenable().addListener((type, oldData, data) -> {
|
||||
String content1 = new String(data.getData());
|
||||
LOG.info("stating load flow config....");
|
||||
parseConsumer.accept(content1);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
7
pom.xml
7
pom.xml
|
@ -66,6 +66,7 @@
|
|||
<netty.version>4.1.84.Final</netty.version>
|
||||
<guava.version>31.1-jre</guava.version>
|
||||
<httpclient.version>4.5.13</httpclient.version>
|
||||
<commons-beanutils.version>1.9.4</commons-beanutils.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
|
@ -212,7 +213,11 @@
|
|||
<artifactId>byte-buddy</artifactId>
|
||||
<version>${bytebuddy.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>${commons-beanutils.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjweaver</artifactId>
|
||||
|
|
Loading…
Reference in New Issue