A Dropwizard extension that integrates Guice dependency injection with optional auto-configuration via classpath scanning.
Dropwizard-Guice is a Dropwizard extension that integrates the Guice dependency injection framework into Dropwizard applications. It provides a bundle to manage dependencies, supports auto-configuration via classpath scanning, and simplifies the setup of resources, tasks, and health checks in Java-based microservices.
Java developers building microservices with Dropwizard who want to incorporate dependency injection using Guice for better code organization and testability.
Developers choose Dropwizard-Guice for its seamless integration of Guice into Dropwizard, reducing boilerplate code through auto-configuration and offering flexibility with custom injector factories, though it's now superseded by dropwizard-guicier for new projects.
Adds support for Guice to Dropwizard
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides a bundle that effortlessly injects Guice into Dropwizard applications, enabling dependency injection across resources, tasks, and health checks without complex setup, as shown in the simple initialization example.
Supports classpath scanning via the Reflections project to automatically discover and install components, reducing manual registration boilerplate for resources, tasks, and health checks in the run method.
Allows replacement of the default Guice injector with custom implementations like Netflix Governator for advanced lifecycle management, using the setInjectorFactory method as demonstrated in the README.
Facilitates easy injection of Dropwizard configuration and environment objects into Guice modules through provider methods, simplifying dependency management in modules, as illustrated in the HelloWorldModule example.
The README explicitly states it's replaced by dropwizard-guicier, meaning no new features, updates, or official support, making it risky for long-term or new projects.
When using auto-configuration, tasks require explicit binding for their names with @Named annotations and module bindings, adding unnecessary boilerplate and potential for errors, as highlighted in the task example.
Integration tests with DropwizardAppRule require manual resetting of jersey2-guice using JerseyGuiceUtils.reset(), increasing setup complexity and maintenance effort, as noted in the testing section.