Class GuiceBootstrapModule<T extends io.dropwizard.core.Configuration>

java.lang.Object
com.google.inject.AbstractModule
ru.vyarus.dropwizard.guice.module.support.DropwizardAwareModule<T>
ru.vyarus.dropwizard.guice.module.GuiceBootstrapModule<T>
Type Parameters:
T - configuration type
All Implemented Interfaces:
com.google.inject.Module, BootstrapAwareModule<T>, ConfigurationAwareModule<T>, ConfigurationTreeAwareModule, EnvironmentAwareModule, OptionsAwareModule

public class GuiceBootstrapModule<T extends io.dropwizard.core.Configuration> extends DropwizardAwareModule<T>
Bootstrap integration guice module.
  • Registers bootstrap, configuration and environment in injector
  • Installs jersey guice extension (to register resources instantiated with guice into jersey) and registers guice filter
Configuration is mapped as:
  • Root configuration class (e.g. MyAppConfiguration extends Configuration)
  • Dropwizard Configuration class
  • All classes in hierarchy between root and Configuration (e.g. MyAppConfiguration extends MyBaseConfiguration extends Configuration
  • All interfaces implemented directly by classes in configuration hierarchy except interfaces from 'java' package (e.g. MyBaseConfiguration implements HasMyOtherConfig)
Since:
31.08.2014
  • Constructor Details

    • GuiceBootstrapModule

      public GuiceBootstrapModule(ConfigurationContext context)
      Create bootstrap module.
      Parameters:
      context - configuration context
  • Method Details

    • configure

      protected void configure()
      Overrides:
      configure in class com.google.inject.AbstractModule