Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Guice for Dropwizard
public ServletContainer getJerseyContainer(DropwizardResourceConfig resourceConfig,
MyServiceConfig serviceConfig) {
// I like having a root module, but you can use as many as you like
final Injector injector = Guice.createInjector(new MyServiceModule(serviceConfig));
return new GuiceContainer(injector) {
public ResourceConfig getDefaultResourceConfig(Map<String,Object> props, WebConfig webConfig) {
return resourceConfig;

This comment has been minimized.

Copy link

@cemo cemo commented Oct 5, 2012

Nice :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment