- add: 增加Nacos配置项完整度判断,如果配置不完整,则跳过处理

This commit is contained in:
wentao 2019-03-07 14:47:26 +08:00
parent 212fb96dcd
commit e9b8eecc76

View File

@ -72,6 +72,9 @@ public class NacosConfigureStarter implements ServerFace {
String group = conf.get(NACOS_GROUP);
String dataType = conf.get(NACOS_DATA_TYPE);
if(Strings.isBlank(serverAddr) || Strings.isBlank(dataId) || Strings.isBlank(group) || Strings.isBlank(dataType)) {
log.debugf("nacos server config is not found or incomplete, skip...");
} else {
Properties properties = new Properties();
properties.put("serverAddr", serverAddr);
ConfigService configService = NacosFactory.createConfigService(properties);
@ -95,6 +98,7 @@ public class NacosConfigureStarter implements ServerFace {
}
});
}
}
private void setConfig(String content, String contentType) {
PropertiesProxy conf = appContext.getConf();