diff --git a/config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigController.java b/config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigController.java index cf0a7b9f4..668097b61 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigController.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigController.java @@ -482,7 +482,7 @@ public class ConfigController { return ResultBuilder.buildResult(ResultCodeEnum.NAMESPACE_NOT_EXIST, failedData); } } - List configInfoList = null; + List configInfoList = null; try { ZipUtils.UnZipResult unziped = ZipUtils.unzip(file.getBytes()); ZipUtils.ZipItem metaDataZipItem = unziped.getMetaDataItem(); @@ -516,7 +516,7 @@ public class ConfigController { + "~" + tempDataId.substring(tempDataId.lastIndexOf(".") + 1); } String metaDataId = group + "." + tempDataId + ".app"; - ConfigInfo ci = new ConfigInfo(); + ConfigAllInfo ci = new ConfigAllInfo(); ci.setTenant(namespace); ci.setGroup(group); ci.setDataId(dataId); @@ -577,10 +577,10 @@ public class ConfigController { return ResultBuilder.buildResult(ResultCodeEnum.DATA_EMPTY, failedData); } - List configInfoList4Clone = new ArrayList<>(queryedDataList.size()); + List configInfoList4Clone = new ArrayList<>(queryedDataList.size()); - for(ConfigInfo ci : queryedDataList){ - ConfigInfo ci4save = new ConfigInfo(); + for(ConfigAllInfo ci : queryedDataList){ + ConfigAllInfo ci4save = new ConfigAllInfo(); ci4save.setTenant(namespace); ci4save.setType(ci.getType()); ci4save.setGroup(ci.getGroup()); diff --git a/config/src/main/java/com/alibaba/nacos/config/server/model/ConfigAllInfo.java b/config/src/main/java/com/alibaba/nacos/config/server/model/ConfigAllInfo.java index 2c0505765..218d263a2 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/model/ConfigAllInfo.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/model/ConfigAllInfo.java @@ -97,12 +97,10 @@ public class ConfigAllInfo extends ConfigInfo { this.effect = effect; } - @Override public String getType() { return type; } - @Override public void setType(String type) { this.type = type; } diff --git a/config/src/main/java/com/alibaba/nacos/config/server/model/ConfigInfo.java b/config/src/main/java/com/alibaba/nacos/config/server/model/ConfigInfo.java index 4073da20c..be0d2de0d 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/model/ConfigInfo.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/model/ConfigInfo.java @@ -28,8 +28,6 @@ public class ConfigInfo extends ConfigInfoBase { private String appName; - private String type; - public ConfigInfo() { } @@ -65,14 +63,6 @@ public class ConfigInfo extends ConfigInfoBase { this.appName = appName; } - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - @Override public int hashCode() { return super.hashCode(); @@ -87,7 +77,7 @@ public class ConfigInfo extends ConfigInfoBase { public String toString() { return "ConfigInfo{" + "id=" + getId() + ", dataId='" + getDataId() + '\'' + ", group='" + getGroup() + '\'' + ", tenant='" + tenant + '\'' + ", appName='" + appName + '\'' + ", content='" + getContent() + '\'' - + ", md5='" + getMd5() + '\'' + ", type='" + type + '\'' + '}'; + + ", md5='" + getMd5() + '\'' + '}'; } } diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/PersistService.java b/config/src/main/java/com/alibaba/nacos/config/server/service/PersistService.java index d3f626b63..5fb623921 100755 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/PersistService.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/PersistService.java @@ -3466,7 +3466,7 @@ public class PersistService { * failData: import failed data (only with abort for the same configs) * skipData: data skipped at import (only with skip for the same configs) */ - public Map batchInsertOrUpdate(List configInfoList, String srcUser, String srcIp, + public Map batchInsertOrUpdate(List configInfoList, String srcUser, String srcIp, Map configAdvanceInfo, Timestamp time, boolean notify, SameConfigPolicy policy) throws NacosException { int succCount = 0; int skipCount = 0; @@ -3474,7 +3474,7 @@ public class PersistService { List> skipData = null; for (int i = 0; i < configInfoList.size(); i++) { - ConfigInfo configInfo = configInfoList.get(i); + ConfigAllInfo configInfo = configInfoList.get(i); try { ParamUtils.checkParam(configInfo.getDataId(), configInfo.getGroup(), "datumId", configInfo.getContent()); } catch (NacosException e) {