Created
April 9, 2012 20:27
-
-
Save stevez/2346397 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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