Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

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

NotificationsYou must be signed in to change notification settings

d3adspace/theresa

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

Build StatusGradle BuildCodeQLGradle Publish
mainGradle BuildCodeQLGradle Publish
devGradle BuildCodeQLNone

Installation / Usage

Gradle

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

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>

Example

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

Goals

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.

Sponsor this project

 

Packages

 
 
 

Languages


[8]ページ先頭

©2009-2025 Movatter.jp