package com.vci.ubcs.codeapply.utils; import net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils; import com.vci.base.common.resource.CommonProperties; /** * 配置信息统一读取类 *
Title:
*Description:
*Copyright: Copyright (c) 2012
*Company: VCI
* @author xchao * @time 2013-3-20 * @version 1.0 */ public class ConfigUtils { /** * 根据KEY,从远程服务器端conf.properties中配置值 *Description: 根据未找到相应的值,则返回KEY
* * @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中配置值 *Description: 根据未找到相应的值,则返回KEY
* * @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; } }