- Notifications
You must be signed in to change notification settings - Fork0
Blazingly intelligent and dynamic dependency injection framework built on google guice inspired by netflix governator providing lifecycle management and other fancy stuff we miss in guice.
License
d3adspace/theresa
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Blazingly intelligent and dynamic dependency injection framework built on google guice inspired by netflix governator providing lifecycle management and other fancy stuff we miss in guice.
Therese is shipping version5.0.1
of GoogleGuice.
Build Status | Gradle Build | CodeQL | Gradle Publish |
---|---|---|---|
main | |||
dev | None |
Gradle repositories
repositories { maven { name="d3adspace-theresa-github-package-registry" description="3adspace Enterprises Theresa GitHub Package Registry" url="https://maven.pkg.github.com/d3adspace/theresa/" }}
Gradle dependencies
dependencies { implementation'de.d3adspace:theresa-core:3.4.0'}
Maven repositories
<repositories> <repository> <id>d3adspace-theresa-github-package-registry</id> <name>D3adspace Enterprises Theresa GitHub Package Registry</name> <url>https://maven.pkg.github.com/d3adspace/theresa/</url> </repository></repositories>
Maven dependencies
<dependency> <groupId>de.d3adspace</groupId> <artifactId>theresa-core</artifactId> <version>3.4.0</version></dependency>
Main Application
vartheresa =TheresaFactory.create();theresa.startLifeCycle();varinstance =theresa.getInstance(ExampleApplication.class);instance.action();theresa.stopLifeCycle();
Managed Instance Interface
/** * @author Felix Klauke (info@felix-klauke.de) */@ImplementedBy(ExampleApplicationImpl.class)publicinterfaceExampleApplication {voidaction();}
Managed instance implementation with life cycle annotations
@SingletonpublicclassExampleApplicationImplimplementsExampleApplication {privatefinalSomethingManagersomethingManager;@InjectpublicExampleApplicationImpl(SomethingManagersomethingManager) {this.somethingManager =somethingManager; }@PostConstructpublicvoidonPostConstruct() {System.out.println(ExampleApplicationImpl.class.getSimpleName() +"#" +"onPostConstruct()"); }@Overridepublicvoidaction() {somethingManager.doSomething(); }@PreDestroypublicvoidonPreDestroy() {System.out.println(ExampleApplicationImpl.class.getSimpleName() +"#" +"onPreDestroy()"); }}
You can find the full examplehere
Some time ago I discoveredNetflix Governator and I really loved the idea ofhaving life cycle management support alongside with dependency injection. Guice was my favourite dependency injectionframework and some time Ago Jordan Zimmerman (mailto:jzimmerman@netflix.com) built a library on top of guice bringingsome nice features like configuration mapping and life cycle management. The goal of this project is to maintainthis idea and functionality in a clean and minimal rewrite.
About
Blazingly intelligent and dynamic dependency injection framework built on google guice inspired by netflix governator providing lifecycle management and other fancy stuff we miss in guice.