Class GuiceBootstrapModule<T extends io.dropwizard.Configuration>

  • 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.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
    • Method Detail

      • configure

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