Lightweight extension for Guice to conveniently inject properties.
- Documentation: [Site] (http://guicearmory.ga)
- License: [Apache v 2.0] (http://www.apache.org/licenses/LICENSE-2.0)
- Build:
- Version: 1.0
#Quick start
Create a class that extends from GiniModule and add @PropertySource passing your properties file as a string
@PropertySource("classpath:my.properties")
public class MyModule extends GiniModule {
}Add it where you create a new Guice injector
Injector injector = Guice.createInjector(new MyModule());Inject values from your properties file with field injection
@Inject @Property("aKey") String aValue;or method injection
@Inject
public MyClass(@Property("aKey") aValue) {
this.aValue = aValue;
}
