HubSpot/dropwizard-guice

singleton with configuration - environment problem

Closed this issue · 1 comments

An application with a singleton requiring configuration gives the following error:
The dropwizard environment has not yet been set. This is likely caused by trying to access the dropwizard environment during the bootstrap phase.

Using version 0.7.0.3
This was not a problem with 0.6.2

Configuration is done via a provider as mentioned in the readme.
Example configure

bind(SomeSingleton.class).in(Singleton.class);

with SomeSingleton depending on SomePool

duplicate of #19