Search in sources :

Example 1 with ConfigDataChangeEvent

use of com.alibaba.nacos.config.server.model.event.ConfigDataChangeEvent in project nacos by alibaba.

the class ConfigController method publishConfig.

/**
 * Adds or updates non-aggregated data.
 *
 * @throws NacosException NacosException.
 */
@PostMapping
@Secured(action = ActionTypes.WRITE, parser = ConfigResourceParser.class)
public Boolean publishConfig(HttpServletRequest request, HttpServletResponse response, @RequestParam(value = "dataId") String dataId, @RequestParam(value = "group") String group, @RequestParam(value = "tenant", required = false, defaultValue = StringUtils.EMPTY) String tenant, @RequestParam(value = "content") String content, @RequestParam(value = "tag", required = false) String tag, @RequestParam(value = "appName", required = false) String appName, @RequestParam(value = "src_user", required = false) String srcUser, @RequestParam(value = "config_tags", required = false) String configTags, @RequestParam(value = "desc", required = false) String desc, @RequestParam(value = "use", required = false) String use, @RequestParam(value = "effect", required = false) String effect, @RequestParam(value = "type", required = false) String type, @RequestParam(value = "schema", required = false) String schema) throws NacosException {
    final String srcIp = RequestUtil.getRemoteIp(request);
    final String requestIpApp = RequestUtil.getAppName(request);
    srcUser = RequestUtil.getSrcUserName(request);
    // check type
    if (!ConfigType.isValidType(type)) {
        type = ConfigType.getDefaultType().getType();
    }
    // check tenant
    ParamUtils.checkTenant(tenant);
    ParamUtils.checkParam(dataId, group, "datumId", content);
    ParamUtils.checkParam(tag);
    Map<String, Object> configAdvanceInfo = new HashMap<String, Object>(10);
    MapUtil.putIfValNoNull(configAdvanceInfo, "config_tags", configTags);
    MapUtil.putIfValNoNull(configAdvanceInfo, "desc", desc);
    MapUtil.putIfValNoNull(configAdvanceInfo, "use", use);
    MapUtil.putIfValNoNull(configAdvanceInfo, "effect", effect);
    MapUtil.putIfValNoNull(configAdvanceInfo, "type", type);
    MapUtil.putIfValNoNull(configAdvanceInfo, "schema", schema);
    ParamUtils.checkParam(configAdvanceInfo);
    if (AggrWhitelist.isAggrDataId(dataId)) {
        LOGGER.warn("[aggr-conflict] {} attempt to publish single data, {}, {}", RequestUtil.getRemoteIp(request), dataId, group);
        throw new NacosException(NacosException.NO_RIGHT, "dataId:" + dataId + " is aggr");
    }
    final Timestamp time = TimeUtils.getCurrentTime();
    String betaIps = request.getHeader("betaIps");
    ConfigInfo configInfo = new ConfigInfo(dataId, group, tenant, appName, content);
    configInfo.setType(type);
    if (StringUtils.isBlank(betaIps)) {
        if (StringUtils.isBlank(tag)) {
            persistService.insertOrUpdate(srcIp, srcUser, configInfo, time, configAdvanceInfo, false);
            ConfigChangePublisher.notifyConfigChange(new ConfigDataChangeEvent(false, dataId, group, tenant, time.getTime()));
        } else {
            persistService.insertOrUpdateTag(configInfo, tag, srcIp, srcUser, time, false);
            ConfigChangePublisher.notifyConfigChange(new ConfigDataChangeEvent(false, dataId, group, tenant, tag, time.getTime()));
        }
    } else {
        // beta publish
        persistService.insertOrUpdateBeta(configInfo, betaIps, srcIp, srcUser, time, false);
        ConfigChangePublisher.notifyConfigChange(new ConfigDataChangeEvent(true, dataId, group, tenant, time.getTime()));
    }
    ConfigTraceService.logPersistenceEvent(dataId, group, tenant, requestIpApp, time.getTime(), InetUtils.getSelfIP(), ConfigTraceService.PERSISTENCE_EVENT_PUB, content);
    return true;
}
Also used : HashMap(java.util.HashMap) ConfigDataChangeEvent(com.alibaba.nacos.config.server.model.event.ConfigDataChangeEvent) ConfigInfo(com.alibaba.nacos.config.server.model.ConfigInfo) Timestamp(java.sql.Timestamp) NacosException(com.alibaba.nacos.api.exception.NacosException) PostMapping(org.springframework.web.bind.annotation.PostMapping) Secured(com.alibaba.nacos.auth.annotation.Secured)

Example 2 with ConfigDataChangeEvent

use of com.alibaba.nacos.config.server.model.event.ConfigDataChangeEvent in project nacos by alibaba.

the class ConfigController method cloneConfig.

/**
 * Execute clone config operation.
 *
 * @param request         http servlet request .
 * @param srcUser         src user string value.
 * @param namespace       namespace string value.
 * @param configBeansList config beans list.
 * @param policy          config policy model.
 * @return RestResult for map.
 * @throws NacosException NacosException.
 */
@PostMapping(params = "clone=true")
@Secured(action = ActionTypes.WRITE, signType = SignType.CONFIG)
public RestResult<Map<String, Object>> cloneConfig(HttpServletRequest request, @RequestParam(value = "src_user", required = false) String srcUser, @RequestParam(value = "tenant") String namespace, @RequestBody List<SameNamespaceCloneConfigBean> configBeansList, @RequestParam(value = "policy", defaultValue = "ABORT") SameConfigPolicy policy) throws NacosException {
    Map<String, Object> failedData = new HashMap<>(4);
    if (CollectionUtils.isEmpty(configBeansList)) {
        failedData.put("succCount", 0);
        return RestResultUtils.buildResult(ResultCodeEnum.NO_SELECTED_CONFIG, failedData);
    }
    configBeansList.removeAll(Collections.singleton(null));
    namespace = NamespaceUtil.processNamespaceParameter(namespace);
    if (StringUtils.isNotBlank(namespace) && persistService.tenantInfoCountByTenantId(namespace) <= 0) {
        failedData.put("succCount", 0);
        return RestResultUtils.buildResult(ResultCodeEnum.NAMESPACE_NOT_EXIST, failedData);
    }
    List<Long> idList = new ArrayList<>(configBeansList.size());
    Map<Long, SameNamespaceCloneConfigBean> configBeansMap = configBeansList.stream().collect(Collectors.toMap(SameNamespaceCloneConfigBean::getCfgId, cfg -> {
        idList.add(cfg.getCfgId());
        return cfg;
    }, (k1, k2) -> k1));
    List<ConfigAllInfo> queryedDataList = persistService.findAllConfigInfo4Export(null, null, null, null, idList);
    if (queryedDataList == null || queryedDataList.isEmpty()) {
        failedData.put("succCount", 0);
        return RestResultUtils.buildResult(ResultCodeEnum.DATA_EMPTY, failedData);
    }
    List<ConfigAllInfo> configInfoList4Clone = new ArrayList<>(queryedDataList.size());
    for (ConfigAllInfo ci : queryedDataList) {
        SameNamespaceCloneConfigBean paramBean = configBeansMap.get(ci.getId());
        ConfigAllInfo ci4save = new ConfigAllInfo();
        ci4save.setTenant(namespace);
        ci4save.setType(ci.getType());
        ci4save.setGroup((paramBean != null && StringUtils.isNotBlank(paramBean.getGroup())) ? paramBean.getGroup() : ci.getGroup());
        ci4save.setDataId((paramBean != null && StringUtils.isNotBlank(paramBean.getDataId())) ? paramBean.getDataId() : ci.getDataId());
        ci4save.setContent(ci.getContent());
        if (StringUtils.isNotBlank(ci.getAppName())) {
            ci4save.setAppName(ci.getAppName());
        }
        ci4save.setDesc(ci.getDesc());
        ci4save.setEncryptedDataKey(ci.getEncryptedDataKey() == null ? StringUtils.EMPTY : ci.getEncryptedDataKey());
        configInfoList4Clone.add(ci4save);
    }
    final String srcIp = RequestUtil.getRemoteIp(request);
    String requestIpApp = RequestUtil.getAppName(request);
    final Timestamp time = TimeUtils.getCurrentTime();
    Map<String, Object> saveResult = persistService.batchInsertOrUpdate(configInfoList4Clone, srcUser, srcIp, null, time, false, policy);
    for (ConfigInfo configInfo : configInfoList4Clone) {
        ConfigChangePublisher.notifyConfigChange(new ConfigDataChangeEvent(false, configInfo.getDataId(), configInfo.getGroup(), configInfo.getTenant(), time.getTime()));
        ConfigTraceService.logPersistenceEvent(configInfo.getDataId(), configInfo.getGroup(), configInfo.getTenant(), requestIpApp, time.getTime(), InetUtils.getSelfIP(), ConfigTraceService.PERSISTENCE_EVENT_PUB, configInfo.getContent());
    }
    return RestResultUtils.success("Clone Completed Successfully", saveResult);
}
Also used : SameNamespaceCloneConfigBean(com.alibaba.nacos.config.server.controller.parameters.SameNamespaceCloneConfigBean) ConfigType(com.alibaba.nacos.api.config.ConfigType) ConfigMetadata(com.alibaba.nacos.config.server.model.ConfigMetadata) RequestParam(org.springframework.web.bind.annotation.RequestParam) URLDecoder(java.net.URLDecoder) Pair(com.alibaba.nacos.common.utils.Pair) ServletException(javax.servlet.ServletException) Date(java.util.Date) LoggerFactory(org.slf4j.LoggerFactory) Constants(com.alibaba.nacos.config.server.constant.Constants) MapUtil(com.alibaba.nacos.common.utils.MapUtil) ResultCodeEnum(com.alibaba.nacos.config.server.result.code.ResultCodeEnum) Map(java.util.Map) GroupkeyListenserStatus(com.alibaba.nacos.config.server.model.GroupkeyListenserStatus) YamlParserUtil(com.alibaba.nacos.config.server.utils.YamlParserUtil) SameNamespaceCloneConfigBean(com.alibaba.nacos.config.server.controller.parameters.SameNamespaceCloneConfigBean) DeleteMapping(org.springframework.web.bind.annotation.DeleteMapping) RestResult(com.alibaba.nacos.common.model.RestResult) PostMapping(org.springframework.web.bind.annotation.PostMapping) TimeUtils(com.alibaba.nacos.config.server.utils.TimeUtils) HttpHeaders(org.springframework.http.HttpHeaders) Timestamp(java.sql.Timestamp) InetUtils(com.alibaba.nacos.sys.utils.InetUtils) Set(java.util.Set) RestController(org.springframework.web.bind.annotation.RestController) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) List(java.util.List) StringUtils(com.alibaba.nacos.common.utils.StringUtils) ConfigInfo(com.alibaba.nacos.config.server.model.ConfigInfo) CollectionUtils(org.springframework.util.CollectionUtils) RestResultUtils(com.alibaba.nacos.common.model.RestResultUtils) ActionTypes(com.alibaba.nacos.plugin.auth.constant.ActionTypes) Secured(com.alibaba.nacos.auth.annotation.Secured) DateFormatUtils(com.alibaba.nacos.common.utils.DateFormatUtils) ConfigDataChangeEvent(com.alibaba.nacos.config.server.model.event.ConfigDataChangeEvent) ConfigTraceService(com.alibaba.nacos.config.server.service.trace.ConfigTraceService) SignType(com.alibaba.nacos.plugin.auth.constant.SignType) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) HashMap(java.util.HashMap) NamespaceUtil(com.alibaba.nacos.common.utils.NamespaceUtil) RequestUtil(com.alibaba.nacos.config.server.utils.RequestUtil) ConfigAllInfo(com.alibaba.nacos.config.server.model.ConfigAllInfo) PersistService(com.alibaba.nacos.config.server.service.repository.PersistService) ArrayList(java.util.ArrayList) RequestBody(org.springframework.web.bind.annotation.RequestBody) HttpServletRequest(javax.servlet.http.HttpServletRequest) ZipUtils(com.alibaba.nacos.config.server.utils.ZipUtils) ConfigInfo4Beta(com.alibaba.nacos.config.server.model.ConfigInfo4Beta) EncryptionHandler(com.alibaba.nacos.plugin.encryption.handler.EncryptionHandler) NacosException(com.alibaba.nacos.api.exception.NacosException) ConfigAdvanceInfo(com.alibaba.nacos.config.server.model.ConfigAdvanceInfo) GetMapping(org.springframework.web.bind.annotation.GetMapping) Page(com.alibaba.nacos.config.server.model.Page) SameConfigPolicy(com.alibaba.nacos.config.server.model.SameConfigPolicy) ParamUtils(com.alibaba.nacos.config.server.utils.ParamUtils) Logger(org.slf4j.Logger) HttpServletResponse(javax.servlet.http.HttpServletResponse) IOException(java.io.IOException) GroupKey(com.alibaba.nacos.config.server.utils.GroupKey) ConfigSubService(com.alibaba.nacos.config.server.service.ConfigSubService) HttpStatus(org.springframework.http.HttpStatus) AggrWhitelist(com.alibaba.nacos.config.server.service.AggrWhitelist) MD5Util(com.alibaba.nacos.config.server.utils.MD5Util) ConfigChangePublisher(com.alibaba.nacos.config.server.service.ConfigChangePublisher) SampleResult(com.alibaba.nacos.config.server.model.SampleResult) MultipartFile(org.springframework.web.multipart.MultipartFile) ResponseEntity(org.springframework.http.ResponseEntity) Collections(java.util.Collections) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) ConfigInfo(com.alibaba.nacos.config.server.model.ConfigInfo) Timestamp(java.sql.Timestamp) ConfigAllInfo(com.alibaba.nacos.config.server.model.ConfigAllInfo) ConfigDataChangeEvent(com.alibaba.nacos.config.server.model.event.ConfigDataChangeEvent) PostMapping(org.springframework.web.bind.annotation.PostMapping) Secured(com.alibaba.nacos.auth.annotation.Secured)

Example 3 with ConfigDataChangeEvent

use of com.alibaba.nacos.config.server.model.event.ConfigDataChangeEvent in project nacos by alibaba.

the class ConfigController method deleteConfig.

/**
 * Synchronously delete all pre-aggregation data under a dataId.
 *
 * @throws NacosException NacosException.
 */
@DeleteMapping
@Secured(action = ActionTypes.WRITE, signType = SignType.CONFIG)
public Boolean deleteConfig(HttpServletRequest request, @RequestParam("dataId") String dataId, @RequestParam("group") String group, @RequestParam(value = "tenant", required = false, defaultValue = StringUtils.EMPTY) String tenant, @RequestParam(value = "tag", required = false) String tag) throws NacosException {
    // check tenant
    ParamUtils.checkTenant(tenant);
    ParamUtils.checkParam(dataId, group, "datumId", "rm");
    ParamUtils.checkParam(tag);
    String clientIp = RequestUtil.getRemoteIp(request);
    String srcUser = RequestUtil.getSrcUserName(request);
    if (StringUtils.isBlank(tag)) {
        persistService.removeConfigInfo(dataId, group, tenant, clientIp, srcUser);
    } else {
        persistService.removeConfigInfoTag(dataId, group, tenant, tag, clientIp, srcUser);
    }
    final Timestamp time = TimeUtils.getCurrentTime();
    ConfigTraceService.logPersistenceEvent(dataId, group, tenant, null, time.getTime(), clientIp, ConfigTraceService.PERSISTENCE_EVENT_REMOVE, null);
    ConfigChangePublisher.notifyConfigChange(new ConfigDataChangeEvent(false, dataId, group, tenant, tag, time.getTime()));
    return true;
}
Also used : ConfigDataChangeEvent(com.alibaba.nacos.config.server.model.event.ConfigDataChangeEvent) Timestamp(java.sql.Timestamp) DeleteMapping(org.springframework.web.bind.annotation.DeleteMapping) Secured(com.alibaba.nacos.auth.annotation.Secured)

Example 4 with ConfigDataChangeEvent

use of com.alibaba.nacos.config.server.model.event.ConfigDataChangeEvent in project nacos by alibaba.

the class ConfigController method importAndPublishConfig.

/**
 * Execute import and publish config operation.
 *
 * @param request   http servlet request .
 * @param srcUser   src user string value.
 * @param namespace namespace string value.
 * @param policy    policy model.
 * @param file      MultipartFile.
 * @return RestResult Map.
 * @throws NacosException NacosException.
 */
@PostMapping(params = "import=true")
@Secured(action = ActionTypes.WRITE, signType = SignType.CONFIG)
public RestResult<Map<String, Object>> importAndPublishConfig(HttpServletRequest request, @RequestParam(value = "src_user", required = false) String srcUser, @RequestParam(value = "namespace", required = false) String namespace, @RequestParam(value = "policy", defaultValue = "ABORT") SameConfigPolicy policy, MultipartFile file) throws NacosException {
    Map<String, Object> failedData = new HashMap<>(4);
    if (Objects.isNull(file)) {
        return RestResultUtils.buildResult(ResultCodeEnum.DATA_EMPTY, failedData);
    }
    namespace = NamespaceUtil.processNamespaceParameter(namespace);
    if (StringUtils.isNotBlank(namespace) && persistService.tenantInfoCountByTenantId(namespace) <= 0) {
        failedData.put("succCount", 0);
        return RestResultUtils.buildResult(ResultCodeEnum.NAMESPACE_NOT_EXIST, failedData);
    }
    List<ConfigAllInfo> configInfoList = new ArrayList<>();
    List<Map<String, String>> unrecognizedList = new ArrayList<>();
    try {
        ZipUtils.UnZipResult unziped = ZipUtils.unzip(file.getBytes());
        ZipUtils.ZipItem metaDataZipItem = unziped.getMetaDataItem();
        RestResult<Map<String, Object>> errorResult;
        if (metaDataZipItem != null && Constants.CONFIG_EXPORT_METADATA_NEW.equals(metaDataZipItem.getItemName())) {
            // new export
            errorResult = parseImportDataV2(unziped, configInfoList, unrecognizedList, namespace);
        } else {
            errorResult = parseImportData(unziped, configInfoList, unrecognizedList, namespace);
        }
        if (errorResult != null) {
            return errorResult;
        }
    } catch (IOException e) {
        failedData.put("succCount", 0);
        LOGGER.error("parsing data failed", e);
        return RestResultUtils.buildResult(ResultCodeEnum.PARSING_DATA_FAILED, failedData);
    }
    if (CollectionUtils.isEmpty(configInfoList)) {
        failedData.put("succCount", 0);
        return RestResultUtils.buildResult(ResultCodeEnum.DATA_EMPTY, failedData);
    }
    final String srcIp = RequestUtil.getRemoteIp(request);
    String requestIpApp = RequestUtil.getAppName(request);
    final Timestamp time = TimeUtils.getCurrentTime();
    Map<String, Object> saveResult = persistService.batchInsertOrUpdate(configInfoList, srcUser, srcIp, null, time, false, policy);
    for (ConfigInfo configInfo : configInfoList) {
        ConfigChangePublisher.notifyConfigChange(new ConfigDataChangeEvent(false, configInfo.getDataId(), configInfo.getGroup(), configInfo.getTenant(), time.getTime()));
        ConfigTraceService.logPersistenceEvent(configInfo.getDataId(), configInfo.getGroup(), configInfo.getTenant(), requestIpApp, time.getTime(), InetUtils.getSelfIP(), ConfigTraceService.PERSISTENCE_EVENT_PUB, configInfo.getContent());
    }
    // unrecognizedCount
    if (!unrecognizedList.isEmpty()) {
        saveResult.put("unrecognizedCount", unrecognizedList.size());
        saveResult.put("unrecognizedData", unrecognizedList);
    }
    return RestResultUtils.success("导入成功", saveResult);
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) ZipUtils(com.alibaba.nacos.config.server.utils.ZipUtils) IOException(java.io.IOException) ConfigInfo(com.alibaba.nacos.config.server.model.ConfigInfo) Timestamp(java.sql.Timestamp) ConfigAllInfo(com.alibaba.nacos.config.server.model.ConfigAllInfo) ConfigDataChangeEvent(com.alibaba.nacos.config.server.model.event.ConfigDataChangeEvent) Map(java.util.Map) HashMap(java.util.HashMap) PostMapping(org.springframework.web.bind.annotation.PostMapping) Secured(com.alibaba.nacos.auth.annotation.Secured)

Example 5 with ConfigDataChangeEvent

use of com.alibaba.nacos.config.server.model.event.ConfigDataChangeEvent in project nacos by alibaba.

the class ConfigController method publishConfig.

/**
 * Adds or updates non-aggregated data.
 *
 * @throws NacosException NacosException.
 */
@PostMapping
@Secured(action = ActionTypes.WRITE, signType = SignType.CONFIG)
public Boolean publishConfig(HttpServletRequest request, @RequestParam(value = "dataId") String dataId, @RequestParam(value = "group") String group, @RequestParam(value = "tenant", required = false, defaultValue = StringUtils.EMPTY) String tenant, @RequestParam(value = "content") String content, @RequestParam(value = "tag", required = false) String tag, @RequestParam(value = "appName", required = false) String appName, @RequestParam(value = "src_user", required = false) String srcUser, @RequestParam(value = "config_tags", required = false) String configTags, @RequestParam(value = "desc", required = false) String desc, @RequestParam(value = "use", required = false) String use, @RequestParam(value = "effect", required = false) String effect, @RequestParam(value = "type", required = false) String type, @RequestParam(value = "schema", required = false) String schema) throws NacosException {
    final String srcIp = RequestUtil.getRemoteIp(request);
    final String requestIpApp = RequestUtil.getAppName(request);
    if (StringUtils.isBlank(srcUser)) {
        srcUser = RequestUtil.getSrcUserName(request);
    }
    // check type
    if (!ConfigType.isValidType(type)) {
        type = ConfigType.getDefaultType().getType();
    }
    // encrypted
    Pair<String, String> pair = EncryptionHandler.encryptHandler(dataId, content);
    content = pair.getSecond();
    // check tenant
    ParamUtils.checkTenant(tenant);
    ParamUtils.checkParam(dataId, group, "datumId", content);
    ParamUtils.checkParam(tag);
    Map<String, Object> configAdvanceInfo = new HashMap<>(10);
    MapUtil.putIfValNoNull(configAdvanceInfo, "config_tags", configTags);
    MapUtil.putIfValNoNull(configAdvanceInfo, "desc", desc);
    MapUtil.putIfValNoNull(configAdvanceInfo, "use", use);
    MapUtil.putIfValNoNull(configAdvanceInfo, "effect", effect);
    MapUtil.putIfValNoNull(configAdvanceInfo, "type", type);
    MapUtil.putIfValNoNull(configAdvanceInfo, "schema", schema);
    ParamUtils.checkParam(configAdvanceInfo);
    if (AggrWhitelist.isAggrDataId(dataId)) {
        LOGGER.warn("[aggr-conflict] {} attempt to publish single data, {}, {}", RequestUtil.getRemoteIp(request), dataId, group);
        throw new NacosException(NacosException.NO_RIGHT, "dataId:" + dataId + " is aggr");
    }
    final Timestamp time = TimeUtils.getCurrentTime();
    String betaIps = request.getHeader("betaIps");
    ConfigInfo configInfo = new ConfigInfo(dataId, group, tenant, appName, content);
    configInfo.setType(type);
    String encryptedDataKey = pair.getFirst();
    configInfo.setEncryptedDataKey(encryptedDataKey);
    if (StringUtils.isBlank(betaIps)) {
        if (StringUtils.isBlank(tag)) {
            persistService.insertOrUpdate(srcIp, srcUser, configInfo, time, configAdvanceInfo, false);
            ConfigChangePublisher.notifyConfigChange(new ConfigDataChangeEvent(false, dataId, group, tenant, time.getTime()));
        } else {
            persistService.insertOrUpdateTag(configInfo, tag, srcIp, srcUser, time, false);
            ConfigChangePublisher.notifyConfigChange(new ConfigDataChangeEvent(false, dataId, group, tenant, tag, time.getTime()));
        }
    } else {
        // beta publish
        configInfo.setEncryptedDataKey(encryptedDataKey);
        persistService.insertOrUpdateBeta(configInfo, betaIps, srcIp, srcUser, time, false);
        ConfigChangePublisher.notifyConfigChange(new ConfigDataChangeEvent(true, dataId, group, tenant, time.getTime()));
    }
    ConfigTraceService.logPersistenceEvent(dataId, group, tenant, requestIpApp, time.getTime(), InetUtils.getSelfIP(), ConfigTraceService.PERSISTENCE_EVENT_PUB, content);
    return true;
}
Also used : HashMap(java.util.HashMap) ConfigDataChangeEvent(com.alibaba.nacos.config.server.model.event.ConfigDataChangeEvent) ConfigInfo(com.alibaba.nacos.config.server.model.ConfigInfo) Timestamp(java.sql.Timestamp) NacosException(com.alibaba.nacos.api.exception.NacosException) PostMapping(org.springframework.web.bind.annotation.PostMapping) Secured(com.alibaba.nacos.auth.annotation.Secured)

Aggregations

ConfigDataChangeEvent (com.alibaba.nacos.config.server.model.event.ConfigDataChangeEvent)12 Timestamp (java.sql.Timestamp)11 Secured (com.alibaba.nacos.auth.annotation.Secured)10 ConfigInfo (com.alibaba.nacos.config.server.model.ConfigInfo)8 NacosException (com.alibaba.nacos.api.exception.NacosException)5 HashMap (java.util.HashMap)5 DeleteMapping (org.springframework.web.bind.annotation.DeleteMapping)5 PostMapping (org.springframework.web.bind.annotation.PostMapping)4 ArrayList (java.util.ArrayList)3 ConfigAllInfo (com.alibaba.nacos.config.server.model.ConfigAllInfo)2 ZipUtils (com.alibaba.nacos.config.server.utils.ZipUtils)2 IOException (java.io.IOException)2 Map (java.util.Map)2 ConfigType (com.alibaba.nacos.api.config.ConfigType)1 RestResult (com.alibaba.nacos.common.model.RestResult)1 RestResultUtils (com.alibaba.nacos.common.model.RestResultUtils)1 Event (com.alibaba.nacos.common.notify.Event)1 Subscriber (com.alibaba.nacos.common.notify.listener.Subscriber)1 DateFormatUtils (com.alibaba.nacos.common.utils.DateFormatUtils)1 MapUtil (com.alibaba.nacos.common.utils.MapUtil)1