我正在使用 apache common PropertiesConfiguration 来加载属性文件,目前我正在使用类似这样的东西
public class PropertiesConfig {
private Configuration config;
private Logs logger = new Logs();
public PropertiesConfig(){
try {
config = new PropertiesConfiguration(Constant.PROP_FILE_PATH+Constant.PROP_FILE_NAME);
} catch (ConfigurationException e) {
logger.error(e.getMessage(), e);
}
logger.info("Properties File Loaded : "+Constant.PROP_FILE_PATH+Constant.PROP_FILE_NAME);
}
public String[] getPropertiesByArray(String key){
return config.getStringArray(key);
}
}
这就是我在控制器类中加载它的方式
public void loadConfig(){
this.dir = config.getPropertiesByArray(Constant.PROP_DIR_CONFIG);
logger.info("Loading Dir path list from propeties config");
for(String d : dir){
logger.info("Dir Set: "+d);
}
但在我的控制台中,我有这个调试消息
2013-04-04 14:14:18,657
DEBUG - ConfigurationUtils.locate(): base is null, name is conf/configuration.properties
2013-04-04 14:14:18,672
DEBUG - Loading configuration from the path conf\configuration.properties
2013-04-04 14:14:18,688
INFO - Properties File Loaded : conf/configuration.properties
它正在加载我的属性文件,但我不确定如何摆脱该调试消息