This is a multi-module maven project demonstrating how to use a variety of different DI frameworks by utilizing JSR-330 annotations.
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
Core: JSR-330:
Coreholds the demo project, a weather forecast command line application.Core-Avajeis a modified version ofCorethat specifies theavaje-inject-generatorprocessor in thepom.xml.
Core: Custom annotations:
Core-HK2is a modified version ofCorethat specifies thehk2-metadata-generatorprocessor in thepom.xml, and uses@Service/@Contractfrom HK2.Core-Invernois a modified version ofCorethat specifies theinverno-core-compilerprocessor in thepom.xml, and uses@Beanfrom Inverno.
Implementations
Impl-Avaje- Using Avaje-Inject framework to generate code for DI.Impl-Dagger- Using Dagger framework to generate code for DI.Impl-Dirk- Using Dirk to reflectively populate injected instances.Impl-Feather- Using Feather to reflectively populate injected instances.Impl-Guice- Using Guice to reflectively populate injected instances.Impl-HK2- Using Glassfish HK2 to use a service-loader to discover and inject instances.Impl-Inverno- Using Inverno framework to generate code for DI from amodule-infofile.Impl-JayWire- Using JayWire to manually populate injected instances.Impl-JBock- Using JBock to generate code for DI, with mostly pre-defined existing module implementation.Impl-Spring- Using Spring Boot to reflectively populate injected instances.Impl-Weld- Using Weld to reflectively populate injected instances.