|
@ -15,24 +15,49 @@ import com.yihu.hos.crawler.model.patient.Patient;
|
|
|
import com.yihu.hos.crawler.model.transform.EhrCondition;
|
|
|
import com.yihu.hos.web.framework.constrant.SqlConstants;
|
|
|
import org.json.JSONObject;
|
|
|
import org.springframework.core.io.ClassPathResource;
|
|
|
import org.springframework.core.io.Resource;
|
|
|
import org.springframework.core.io.support.EncodedResource;
|
|
|
import org.springframework.core.io.support.PropertiesLoaderUtils;
|
|
|
import sun.misc.BASE64Encoder;
|
|
|
|
|
|
import java.io.File;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.UUID;
|
|
|
import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* Created by hzp on 2016/3/10.
|
|
|
*/
|
|
|
public class EsbHttp {
|
|
|
|
|
|
public static String defaultHttpUrl;
|
|
|
public static String clientId;
|
|
|
public static String clientKey;
|
|
|
public static String httpGateway;
|
|
|
public static String defaultHttpUser;
|
|
|
public static String defaultHttpPassword;
|
|
|
public static String sslKeyStore;
|
|
|
public static String sslPassword;
|
|
|
private static Logger logger = LoggerFactory.getLogger(EsbHttp.class);
|
|
|
public static String defaultHttpUrl = "";
|
|
|
public static String clientId = "";
|
|
|
public static String clientKey = "";
|
|
|
public static String httpGateway = "";
|
|
|
|
|
|
static {
|
|
|
//默认配置
|
|
|
try {
|
|
|
Resource resource = new ClassPathResource("config/http.properties");
|
|
|
EncodedResource encRes = new EncodedResource(resource, "UTF-8");
|
|
|
Properties props = PropertiesLoaderUtils.loadProperties(encRes);
|
|
|
|
|
|
defaultHttpUrl = props.getProperty("httpUrl");
|
|
|
defaultHttpUser = props.getProperty("httpUser");
|
|
|
defaultHttpPassword = props.getProperty("httpPassword");
|
|
|
clientId = props.getProperty("clientId");
|
|
|
clientKey = props.getProperty("clientKey");
|
|
|
sslKeyStore = props.getProperty("sslKeystore");
|
|
|
sslPassword = props.getProperty("sslPassword");
|
|
|
} catch (Exception e) {
|
|
|
System.out.print(e.getMessage());
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/***************************** 用户接口 *********************************************/
|
|
|
/**
|