Skip to content

Instantly share code, notes, and snippets.

@stevez
Created April 9, 2012 20:27
Show Gist options
  • Select an option

  • Save stevez/2346397 to your computer and use it in GitHub Desktop.

Select an option

Save stevez/2346397 to your computer and use it in GitHub Desktop.
public void test_load_2_files() {
CompositeConfiguration config = new CompositeConfiguration();
try {
config.addConfiguration(new PropertiesConfiguration(
"user.properties"));
config.addConfiguration(new PropertiesConfiguration(
"app.properties"));
Configuration extConfig = config.interpolatedConfiguration();
Iterator<String> iter = extConfig.getKeys();
while (iter.hasNext()) {
String key = iter.next();
Object value = extConfig.getProperty(key);
System.out.println("key=" + key + ",value=" + value);
}
} catch (ConfigurationException e) {
e.printStackTrace();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment