mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-15 04:22:09 +08:00
填充初始化数据
This commit is contained in:
@@ -40,11 +40,20 @@ public class NacosXmlELParser extends ClassXmlFlowELParser {
|
||||
if (StrUtil.isBlank(nacosParserVO.getServerAddr())){
|
||||
nacosParserVO.setServerAddr("127.0.0.1:8848");
|
||||
}
|
||||
if (StrUtil.isBlank(nacosParserVO.getNamespace())){
|
||||
nacosParserVO.setNamespace("");
|
||||
}
|
||||
if (StrUtil.isBlank(nacosParserVO.getDataId())){
|
||||
nacosParserVO.setDataId("LiteFLow");
|
||||
}
|
||||
if (StrUtil.isBlank(nacosParserVO.getGroup())){
|
||||
nacosParserVO.setGroup("LiteFLowConfig");
|
||||
nacosParserVO.setGroup("LITE_FLOW_GROUP");
|
||||
}
|
||||
if (StrUtil.isBlank(nacosParserVO.getUsername())){
|
||||
nacosParserVO.setUsername("");
|
||||
}
|
||||
if (StrUtil.isBlank(nacosParserVO.getPassword())){
|
||||
nacosParserVO.setPassword("");
|
||||
}
|
||||
helper = new NacosParserHelper(nacosParserVO, parseConsumer);
|
||||
}catch (Exception e){
|
||||
|
||||
@@ -43,6 +43,9 @@ public class NacosParserHelper {
|
||||
try{
|
||||
Properties properties = new Properties();
|
||||
properties.put(PropertyKeyConst.SERVER_ADDR, nacosParserVO.getServerAddr());
|
||||
properties.put(PropertyKeyConst.NAMESPACE,nacosParserVO.getNamespace());
|
||||
properties.put(PropertyKeyConst.USERNAME,nacosParserVO.getUsername());
|
||||
properties.put(PropertyKeyConst.PASSWORD,nacosParserVO.getPassword());
|
||||
this.configService = NacosFactory.createConfigService(properties);
|
||||
CONFIG_MAP.put("Content",configService.getConfig(nacosParserVO.getDataId(), nacosParserVO.getGroup(), 3000L));
|
||||
}catch (Exception e){
|
||||
@@ -86,7 +89,6 @@ public class NacosParserHelper {
|
||||
}
|
||||
});
|
||||
}catch (Exception ex){
|
||||
LOG.error("listener Exception {} " , ex.getMessage());
|
||||
throw new NacosException(ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user