Created
October 9, 2013 20:35
-
-
Save billy-bacon/6907900 to your computer and use it in GitHub Desktop.
Guice Names.bindProperties
This file contains 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 bindProperties(Binder binder, String propertiesFile) { | |
log.info("binding {}", propertiesFile); | |
try { | |
final Properties props = new Properties(); | |
props.load(this.getClass().getClassLoader().getResourceAsStream(propertiesFile)); | |
Names.bindProperties(binder, props); | |
} catch (IOException e) { | |
throw new RuntimeException("Could not load " + propertiesFile, e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment