com.github.javaclub.configcenter.client.ConfigLocalSave Maven / Gradle / Ivy
package com.github.javaclub.configcenter.client;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.alibaba.fastjson.JSONObject;
import com.github.javaclub.configcenter.client.domain.CfgVO;
import com.github.javaclub.configcenter.client.util.DESCoder;
import com.github.javaclub.configcenter.client.util.LocalFileUtils;
/**
* 本地保存一份配置,容灾
*/
public class ConfigLocalSave {
private static final Logger logger = LoggerFactory.getLogger(ConfigLocalSave.class);
private static ConfigLocalSave instance = new ConfigLocalSave();
public static ConfigLocalSave getInstance() {
return instance;
}
public synchronized Map get(int appid, String appkey, String configkey) {
try {
List