cmmon-Configuration动态对去配置文件

static{
		try {
			config = new PropertiesConfiguration("jeesite.properties");
			FileChangedReloadingStrategy strategy =new FileChangedReloadingStrategy();
			strategy.setRefreshDelay(5000);//每隔5秒查询一次文件是否修改
			config.setReloadingStrategy(strategy);
		} catch (ConfigurationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}


String value = config.getString(key);

你可能感兴趣的:(java)