【Java开源代码栏目提醒】:本文主要为网学会员提供BaseConfig.java,希望对需要BaseConfig.java网友有所帮助,学习一下!
package org.appfuse.util.config;
import java.util.Properties;
public class BaseConfig
implements ConfigInterface {
private String configName = null;
private Properties systemProps = null;
public String getConfigName() {
return configName;
}
public void setConfigName(String configName) {
this.configName = configName;
}
public Properties getSystemProps() {
return systemProps;
}
public void setSystemProps(Properties systemProps) {
this.systemProps = systemProps;
}
/**
* 根据名称,直接取得配置的值
* @param name Object
* @return Object
*/
public Object getPropByName(Object name) {
return systemProps.get(name);
}
/**
* Get config property by name.
* @param name Property name
* @return Property value
*/
public String getProperty(String name) {
return systemProps.getProperty(name);
}
}