Skip to content

Latest commit

 

History

History

dependency-injection

Dependency Injection Demo Project

This is a multi-module maven project demonstrating how to use a variety of different DI frameworks by utilizing JSR-330 annotations.

Usage

Run one of the Main classes in one of the impl modules.

>help

Available commands:
 - current
 - remote
 - where

>where

38, -77

>current

Temperature: 83.00'F
Forecast:    Chance Showers And Thunderstorms
Wind:        South 7.00mph

Modules

Core: JSR-330:

  • Core holds the demo project, a weather forecast command line application.
  • Core-Avaje is a modified version of Core that specifies the avaje-inject-generator processor in the pom.xml.

Core: Custom annotations:

  • Core-HK2 is a modified version of Core that specifies the hk2-metadata-generator processor in the pom.xml, and uses @Service/@Contract from HK2.
  • Core-Inverno is a modified version of Core that specifies the inverno-core-compiler processor in the pom.xml, and uses @Bean from Inverno.

Implementations