Giter Site home page Giter Site logo

d3adspace / theresa Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 346 KB

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.

Home Page: https://www.felix-klauke.de

License: MIT License

Java 100.00%
governator netflix netflix-governator guice cdi lifecycle lifecycle-management enterprise java-ee java-annotations

theresa's Introduction

theresa

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 version 5.0.1 of Google Guice.

Build Status

Build Status Gradle Build CodeQL Gradle Publish
main Gradle Build CodeQL Gradle Publish
dev Gradle Build CodeQL None

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

var theresa = TheresaFactory.create();

theresa.startLifeCycle();

var instance = theresa.getInstance(ExampleApplication.class);
instance.action();

theresa.stopLifeCycle();

Managed Instance Interface

/**
 * @author Felix Klauke ([email protected])
 */
@ImplementedBy(ExampleApplicationImpl.class)
public interface ExampleApplication {
    void action();
}

Managed instance implementation with life cycle annotations

@Singleton
public class ExampleApplicationImpl implements ExampleApplication {
    private final SomethingManager somethingManager;

    @Inject
    public ExampleApplicationImpl(SomethingManager somethingManager) {
        this.somethingManager = somethingManager;
    }

    @PostConstruct
    public void onPostConstruct() {
        System.out.println(ExampleApplicationImpl.class.getSimpleName() + "#" + "onPostConstruct()");
    }

    @Override
    public void action() {
        somethingManager.doSomething();
    }

    @PreDestroy
    public void onPreDestroy() {
        System.out.println(ExampleApplicationImpl.class.getSimpleName() + "#" + "onPreDestroy()");
    }
}

You can find the full example here

Goals

Some time ago I discovered Netflix Governator and I really loved the idea of having life cycle management support alongside with dependency injection. Guice was my favourite dependency injection framework and some time Ago Jordan Zimmerman (mailto:[email protected]) built a library on top of guice bringing some nice features like configuration mapping and life cycle management. The goal of this project is to maintain this idea and functionality in a clean and minimal rewrite.

theresa's People

Contributors

felixklauke avatar

Watchers

 avatar  avatar

theresa's Issues

Dependabot couldn't find a pom.xml for this project

Dependabot couldn't find a pom.xml for this project.

Dependabot requires a pom.xml to evaluate your project's current Java dependencies. It had expected to find one at the path: /pom.xml.

If this isn't a Java project, or if it is a library, you may wish to disable updates for it in the .github/dependabot.yml file in this repo.

View the update logs.

Dependabot couldn't find a pom.xml for this project

Dependabot couldn't find a pom.xml for this project.

Dependabot requires a pom.xml to evaluate your project's current Java dependencies. It had expected to find one at the path: /pom.xml.

If this isn't a Java project, or if it is a library, you may wish to disable updates for it in the .github/dependabot.yml file in this repo.

View the update logs.

Dependabot couldn't find a pom.xml for this project

Dependabot couldn't find a pom.xml for this project.

Dependabot requires a pom.xml to evaluate your project's current Java dependencies. It had expected to find one at the path: /pom.xml.

If this isn't a Java project, or if it is a library, you may wish to disable updates for it in the .github/dependabot.yml file in this repo.

View the update logs.

Dependabot couldn't find a pom.xml for this project

Dependabot couldn't find a pom.xml for this project.

Dependabot requires a pom.xml to evaluate your project's current Java dependencies. It had expected to find one at the path: /pom.xml.

If this isn't a Java project, or if it is a library, you may wish to disable updates for it in the .github/dependabot.yml file in this repo.

View the update logs.

Dependabot couldn't find a pom.xml for this project

Dependabot couldn't find a pom.xml for this project.

Dependabot requires a pom.xml to evaluate your project's current Java dependencies. It had expected to find one at the path: /pom.xml.

If this isn't a Java project, or if it is a library, you may wish to disable updates for it in the .github/dependabot.yml file in this repo.

View the update logs.

Dependabot couldn't find a pom.xml for this project

Dependabot couldn't find a pom.xml for this project.

Dependabot requires a pom.xml to evaluate your project's current Java dependencies. It had expected to find one at the path: /pom.xml.

If this isn't a Java project, or if it is a library, you may wish to disable updates for it in the .github/dependabot.yml file in this repo.

View the update logs.

Dependabot couldn't find a pom.xml for this project

Dependabot couldn't find a pom.xml for this project.

Dependabot requires a pom.xml to evaluate your project's current Java dependencies. It had expected to find one at the path: /pom.xml.

If this isn't a Java project, or if it is a library, you may wish to disable updates for it in the .github/dependabot.yml file in this repo.

View the update logs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.