Set<String> names = CollectUtils.newHashSet();
for (PropertyConfigItemBean config : configs) {
names.add(config.getName());
}
String msg = "info.save.success";
PropertyConfigItemBean newConfig = populate(PropertyConfigItemBean.class, "configNew");
if (StringUtils.isNotBlank(newConfig.getName()) && StringUtils.isNotBlank(newConfig.getValue())
&& !names.contains(newConfig.getName())) {
entityDao.saveOrUpdate(newConfig);
}
configFactory.reload();
return redirect("dynaInfo", msg);
}