From a7c2d4424ea1206513eb149d8b354903ee07281e Mon Sep 17 00:00:00 2001 From: Mark J Greene Date: Fri, 23 Nov 2018 12:09:44 -0500 Subject: [PATCH 1/6] Add docs for upgrading from dropwizard-guice --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index c79248d..95ba992 100644 --- a/README.md +++ b/README.md @@ -47,4 +47,15 @@ binding, [for example](https://github.com/jhaber/dropwizard-guicier-example/blob There is an [example project](https://github.com/jhaber/dropwizard-guicier-example) you can clone and play with if you'd like to get going right away. +## Upgrading from dropwizard-guice +There are a couple important changes to be aware of if you are upgradingn from [dropwizard-guice](https://github.com/HubSpot/dropwizard-guice). + +### AutoConfig has been removed +[Reasoning and potential workarounds here](https://github.com/HubSpot/dropwizard-guicier/issues/41). The workarounds are however, not recommended. + +### Explicit Bindings Required +All objects that you wish to inject must be explicitly bound. Just-in-time bindings are not supported by default. This is the case despite you enabling explicit binnding in your own module. + +You can however (albeit not recommended) disable the explicit binding behavior by setting `enableGuiceEnforcer(false)` on the `GuiceBundle` within your DW application. + Enjoy! From 3f6a36b1581b6ff338635344a158ea982c54d133 Mon Sep 17 00:00:00 2001 From: Mark J Greene Date: Fri, 23 Nov 2018 12:11:51 -0500 Subject: [PATCH 2/6] spelling --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 95ba992..bcb338f 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ There is an [example project](https://github.com/jhaber/dropwizard-guicier-examp going right away. ## Upgrading from dropwizard-guice -There are a couple important changes to be aware of if you are upgradingn from [dropwizard-guice](https://github.com/HubSpot/dropwizard-guice). +There are a couple important changes to be aware of when upgrading from [dropwizard-guice](https://github.com/HubSpot/dropwizard-guice). ### AutoConfig has been removed [Reasoning and potential workarounds here](https://github.com/HubSpot/dropwizard-guicier/issues/41). The workarounds are however, not recommended. From 1a95cf03ab2214da806b3bc748f58b33cf816cc3 Mon Sep 17 00:00:00 2001 From: Mark J Greene Date: Sat, 24 Nov 2018 23:20:46 -0500 Subject: [PATCH 3/6] typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bcb338f..a65350e 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ There are a couple important changes to be aware of when upgrading from [dropwiz [Reasoning and potential workarounds here](https://github.com/HubSpot/dropwizard-guicier/issues/41). The workarounds are however, not recommended. ### Explicit Bindings Required -All objects that you wish to inject must be explicitly bound. Just-in-time bindings are not supported by default. This is the case despite you enabling explicit binnding in your own module. +All objects that you wish to inject must be explicitly bound. Just-in-time bindings are not supported by default. This is the case despite you enabling explicit binding in your own module. You can however (albeit not recommended) disable the explicit binding behavior by setting `enableGuiceEnforcer(false)` on the `GuiceBundle` within your DW application. From 278056ff871116db844126a41711155d91900011 Mon Sep 17 00:00:00 2001 From: Mark J Greene Date: Sat, 1 Dec 2018 16:31:46 -0500 Subject: [PATCH 4/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a65350e..da38c7b 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ There are a couple important changes to be aware of when upgrading from [dropwiz [Reasoning and potential workarounds here](https://github.com/HubSpot/dropwizard-guicier/issues/41). The workarounds are however, not recommended. ### Explicit Bindings Required -All objects that you wish to inject must be explicitly bound. Just-in-time bindings are not supported by default. This is the case despite you enabling explicit binding in your own module. +All objects that you wish to inject must be explicitly bound. Just-in-time bindings are not supported by default. This is the case despite you **not** enabling explicit binding in your own module. You can however (albeit not recommended) disable the explicit binding behavior by setting `enableGuiceEnforcer(false)` on the `GuiceBundle` within your DW application. From 93a28dd2e14f64e91d6bdf094cc79b3e3461ca41 Mon Sep 17 00:00:00 2001 From: Jonathan Haber Date: Thu, 15 Aug 2019 22:48:44 -0400 Subject: [PATCH 5/6] Update README.md --- README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index da38c7b..58135dc 100644 --- a/README.md +++ b/README.md @@ -51,11 +51,7 @@ going right away. There are a couple important changes to be aware of when upgrading from [dropwizard-guice](https://github.com/HubSpot/dropwizard-guice). ### AutoConfig has been removed -[Reasoning and potential workarounds here](https://github.com/HubSpot/dropwizard-guicier/issues/41). The workarounds are however, not recommended. +Reasoning 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). ### Explicit Bindings Required -All objects that you wish to inject must be explicitly bound. Just-in-time bindings are not supported by default. This is the case despite you **not** enabling explicit binding in your own module. - -You can however (albeit not recommended) disable the explicit binding behavior by setting `enableGuiceEnforcer(false)` on the `GuiceBundle` within your DW application. - -Enjoy! +By 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 disable 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`. From e193eca5142a6f0ba83417c0c7008022be951716 Mon Sep 17 00:00:00 2001 From: Jonathan Haber Date: Thu, 15 Aug 2019 22:49:21 -0400 Subject: [PATCH 6/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 58135dc..4448bb0 100644 --- a/README.md +++ b/README.md @@ -54,4 +54,4 @@ There are a couple important changes to be aware of when upgrading from [dropwiz Reasoning 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). ### Explicit Bindings Required -By 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 disable 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`. +By 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`.