/** * 加载指定配置文件 * * @param configFileName * 这个文件的名称 */ public void loadConfig(String configFileName) { try { ConfigurationFactory factory = new ConfigurationFactory( configFileName); config = factory.getConfiguration(); log.info("加载配置文件: " + configFileName); } catch (Exception ex) { log.error(ex.getMessage(), ex); throw new RuntimeException("配置文件加载错误: " + configFileName, ex); } }
/** * Loads the specific configuration file. * * @param configFileName the file name */ public void loadConfig(String configFileName) { try { ConfigurationFactory factory = new ConfigurationFactory( configFileName); config = factory.getConfiguration(); log.info("Configuration loaded: " + configFileName); } catch (Exception ex) { log.error(ex.getMessage(), ex); throw new RuntimeException("Configuration loading error: " + configFileName, ex); } }
public void loadConfig(String configFileName) { try { ConfigurationFactory factory = new ConfigurationFactory( configFileName); config = factory.getConfiguration(); log.info("Configuration loaded: " + configFileName); } catch (Exception ex) { log.error(ex.getMessage(), ex); throw new RuntimeException("Configuration loading error: " + configFileName, ex); } }