From a6094a0ce5f4a49aec701cd7217464efa06c50c7 Mon Sep 17 00:00:00 2001 From: "everywhere.z" Date: Tue, 25 Oct 2022 18:01:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dnacos,etcd=E7=94=B1=E4=BA=8ES?= =?UTF-8?q?pringAware=E5=8F=96=E4=B8=8D=E5=88=B0bean=E4=BC=9A=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yomahub/liteflow/parser/etcd/util/EtcdParserHelper.java | 4 +++- .../yomahub/liteflow/parser/nacos/util/NacosParserHelper.java | 4 +++- pom.xml | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/liteflow-rule-plugin/liteflow-rule-etcd/src/main/java/com/yomahub/liteflow/parser/etcd/util/EtcdParserHelper.java b/liteflow-rule-plugin/liteflow-rule-etcd/src/main/java/com/yomahub/liteflow/parser/etcd/util/EtcdParserHelper.java index 6c45f36a2..560ade1f1 100644 --- a/liteflow-rule-plugin/liteflow-rule-etcd/src/main/java/com/yomahub/liteflow/parser/etcd/util/EtcdParserHelper.java +++ b/liteflow-rule-plugin/liteflow-rule-etcd/src/main/java/com/yomahub/liteflow/parser/etcd/util/EtcdParserHelper.java @@ -30,7 +30,9 @@ public class EtcdParserHelper { this.etcdParserVO = etcdParserVO; try{ - this.etcdClient = ContextAwareHolder.loadContextAware().getBean(EtcdClient.class); + try{ + this.etcdClient = ContextAwareHolder.loadContextAware().getBean(EtcdClient.class); + }catch (Exception ignored){} if (this.etcdClient == null) { Client client = Client.builder() .endpoints(etcdParserVO.getConnectStr().split(",")) diff --git a/liteflow-rule-plugin/liteflow-rule-nacos/src/main/java/com/yomahub/liteflow/parser/nacos/util/NacosParserHelper.java b/liteflow-rule-plugin/liteflow-rule-nacos/src/main/java/com/yomahub/liteflow/parser/nacos/util/NacosParserHelper.java index 10f8d3c33..3bb5ed3a0 100644 --- a/liteflow-rule-plugin/liteflow-rule-nacos/src/main/java/com/yomahub/liteflow/parser/nacos/util/NacosParserHelper.java +++ b/liteflow-rule-plugin/liteflow-rule-nacos/src/main/java/com/yomahub/liteflow/parser/nacos/util/NacosParserHelper.java @@ -32,7 +32,9 @@ public class NacosParserHelper { public NacosParserHelper(NacosParserVO nacosParserVO) { this.nacosParserVO = nacosParserVO; try{ - this.configService = ContextAwareHolder.loadContextAware().getBean(NacosConfigService.class); + try{ + this.configService = ContextAwareHolder.loadContextAware().getBean(NacosConfigService.class); + }catch (Exception ignored){} if (this.configService == null){ Properties properties = new Properties(); properties.put(PropertyKeyConst.SERVER_ADDR, nacosParserVO.getServerAddr()); diff --git a/pom.xml b/pom.xml index 677606500..f862e02ef 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ - 2.9.1 + 2.9.2 UTF-8 UTF-8 8