package com.vci.rmip.code.client.codeapply.Apply410.utils;
|
import org.apache.commons.lang.StringUtils;
|
|
import com.vci.base.common.resource.CommonProperties;
|
|
/**
|
* 配置信息统一读取类
|
* <p>Title: </p>
|
* <p>Description: </p>
|
* <p>Copyright: Copyright (c) 2012</p>
|
* <p>Company: VCI</p>
|
* @author xchao
|
* @time 2013-3-20
|
* @version 1.0
|
*/
|
public class ConfigUtils {
|
|
|
/**
|
* 根据KEY,从远程服务器端conf.properties中配置值
|
* <p>Description: 根据未找到相应的值,则返回KEY</p>
|
*
|
* @author xchao
|
* @time 2013-3-20
|
* @param key
|
* @return
|
*/
|
public static String getConfigValue(String key){
|
String res=CommonProperties.getStringProperty(key);
|
return res;
|
}
|
|
/**
|
* 根据KEY,从远程服务器端conf.properties中配置值
|
* <p>Description: 根据未找到相应的值,则返回KEY</p>
|
*
|
* @author xchao
|
* @time 2013-3-20
|
* @param key
|
* @return
|
*/
|
public static String getConfigValue(String key,String defaultValue){
|
String res=CommonProperties.getStringProperty(key);
|
if(StringUtils.isBlank(res)){
|
return defaultValue;
|
}
|
return res;
|
}
|
}
|