SDA Commons Server Weld¶
sda-commons-server-weld
is used to bootstrap Dropwizard applications inside a Weld-SE container and provides CDI
support for servlets, listeners and resources.
It allows to inject the application class or instances produced by the application class.
Info: We at SDA SE do not use CDI in our microservices anymore. We believe that dependency injection is not helpful for small services. Therefore, this module is not actively maintained by SDA SE developers. Automated security upgrades are enabled. Contributions of new features and bug fixes are welcome.
Usage¶
Application Bootstrap¶
To bootstrap a Dropwizard application inside a Weld-SE container, use the DropwizardWeldHelper
:
1 2 3 |
|
Provided Bundles¶
To optionally use CDI support inside of servlets, use the additional WeldBundle
:
1 2 3 |
|