package com.yihu.hos.rest.common.configuration; import com.yihu.hos.rest.common.http.EHRHttpHelper; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; import javax.annotation.PostConstruct; /** * EHR连接地址配置 * @author HZY * @vsrsion 1.0 * Created at 2017/7/31. */ @Configuration public class EhrUrlConfiguration { @Value("${service-gateway.ehrMgrUrl}") private String ehrMgrUrl; @Value("${service-gateway.ehrCouldUrl}") private String ehrCouldUrl; @Value("${service-gateway.ehrAdminUrl}") private String ehrAdminUrl; @Value("${service-gateway.sslKeystore}") private String sslKeystore; @Value("${service-gateway.sslPassword}") private String sslPassword; @Value("${service-gateway.clientId}") private String clientId; @Value("${service-gateway.clientKey}") private String clientKey; private static EhrUrlConfiguration configuration; @PostConstruct public void initValue(){ configuration = this; EHRHttpHelper.initConfig(configuration); } public String getEhrMgrUrl() { return ehrMgrUrl; } public String getEhrCouldUrl() { return ehrCouldUrl; } public String getEhrAdminUrl() { return ehrAdminUrl; } public String getSslKeystore() { return sslKeystore; } public String getSslPassword() { return sslPassword; } public String getClientId() { return clientId; } public String getClientKey() { return clientKey; } }