{"id":31970504,"url":"https://github.com/hubspot/dropwizard-guicier","last_synced_at":"2025-10-14T19:15:56.453Z","repository":{"id":52289036,"uuid":"45265198","full_name":"HubSpot/dropwizard-guicier","owner":"HubSpot","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-24T16:36:21.000Z","size":176,"stargazers_count":44,"open_issues_count":15,"forks_count":22,"subscribers_count":163,"default_branch":"master","last_synced_at":"2025-10-03T03:45:00.441Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HubSpot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-10-30T17:10:36.000Z","updated_at":"2025-09-24T16:35:29.000Z","dependencies_parsed_at":"2024-01-03T02:24:49.468Z","dependency_job_id":"a1b67513-61c2-4ae4-b725-5bca3ff48709","html_url":"https://github.com/HubSpot/dropwizard-guicier","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/HubSpot/dropwizard-guicier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2Fdropwizard-guicier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2Fdropwizard-guicier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2Fdropwizard-guicier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2Fdropwizard-guicier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HubSpot","download_url":"https://codeload.github.com/HubSpot/dropwizard-guicier/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2Fdropwizard-guicier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020649,"owners_count":26086895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-14T19:15:52.037Z","updated_at":"2025-10-14T19:15:56.442Z","avatar_url":"https://github.com/HubSpot.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dropwizard-guicier\n\nA Dropwizard bundle to handle Guice integration.\n\n## Usage\n```xml\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003ecom.hubspot.dropwizard\u003c/groupId\u003e\n            \u003cartifactId\u003edropwizard-guicier\u003c/artifactId\u003e\n            \u003cversion\u003e1.3.5.2\u003c/version\u003e\n        \u003c/dependency\u003e\n    \u003c/dependencies\u003e\n```\n\nSimply install a new instance of the bundle during your service initialization\n```java\npublic class ExampleApplication extends Application\u003cExampleConfiguration\u003e {\n\n  public static void main(String... args) throws Exception {\n    new ExampleApplication().run(args);\n  }\n\n  @Override\n  public void initialize(Bootstrap\u003cExampleConfiguration\u003e bootstrap) {\n    GuiceBundle\u003cExampleConfiguration\u003e guiceBundle = GuiceBundle.defaultBuilder(ExampleConfiguration.class)\n        .modules(new ExampleModule())\n        .build();\n\n    bootstrap.addBundle(guiceBundle);\n  }\n\n  @Override\n  public void run(ExampleConfiguration configuration, Environment environment) throws Exception {}\n}\n```\n\n## Features\n- Injector is created during the run phase so `Configuration` and `Environment` are available to eager singletons (injector is also\ncreated with `Stage.PRODUCTION` by default) \n- Modules added to the `GuiceBundle` can extend `DropwizardAwareModule` which gives them\naccess to the `Bootstrap`, `Configuration`, and `Environment` inside of the `configure` method. This can be used to do conditional\nbinding, [for example](https://github.com/jhaber/dropwizard-guicier-example/blob/6a7aaaad8a69b3e3331504ebdf77754eccb9bf6b/src/main/java/com/hubspot/dropwizard/example/ExampleModule.java#L20-L23)\n- Any `Managed`, `Task`, `HealthCheck`, or `ServerLifecycleListener` bound in Guice will be added to Dropwizard for you, [for example](https://github.com/jhaber/dropwizard-guicier-example/blob/6a7aaaad8a69b3e3331504ebdf77754eccb9bf6b/src/main/java/com/hubspot/dropwizard/example/ExampleModule.java#L31-L37) (must be eager singletons for this to work)\n\n## Examples\nThere is an [example project](https://github.com/jhaber/dropwizard-guicier-example) you can clone and play with if you'd like to get\ngoing right away. \n\n## Upgrading from dropwizard-guice\nThere are a couple important changes to be aware of when upgrading from [dropwizard-guice](https://github.com/HubSpot/dropwizard-guice).\n\n### AutoConfig has been removed\nReasoning and potential workarounds are discussed [here](https://github.com/HubSpot/dropwizard-guicier/issues/41) (fwiw we've ditched AutoConfig internally and have never looked back).\n\n### Explicit Bindings Required\nBy default, dropwizard-guicier installs a [module](https://github.com/mgreene/dropwizard-guicier/blob/278056ff871116db844126a41711155d91900011/src/main/java/com/hubspot/dropwizard/guicier/GuiceBundle.java#L135-L143) which makes Guice run in a more strict mode. In particular, just-in-time bindings are disabled and all objects must be explicitly bound. In addition, it requires that no-arg constructors are annotated with `@Inject` for Guice to use them. You can opt out of having this module installed by calling `enableGuiceEnforcer(false)` when constructing your `GuiceBundle`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubspot%2Fdropwizard-guicier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhubspot%2Fdropwizard-guicier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubspot%2Fdropwizard-guicier/lists"}