Skip to content

davidtimmerman/gini

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gini

Lightweight extension for Guice to conveniently inject properties.

#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;
    }

endorse

About

Lightweight framework built on Guice for conviently injecting properties

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages