Class ConfigBindingModule
- All Implemented Interfaces:
com.google.inject.Module
Config.
Note that not all configuration paths may be available because configuration is introspected using jersey serialization api and some configuration classes may only consume properties (e.g. value consumed directly in setter - impossible to read back).
All content types are bound by declaration type (as they declared in configuration class). All primitive types
are boxed. All collection types like List, Set, Map, Multimap are bound by collection type (List, Set etc).
Generics are always used in binding (so @inject @Config("path") List<String> val will work and
@inject @Config("path") List val will not).
Root configuration objects are bound with and without qualifier, except root interfaces which are bound with qualifier only.
ConfigurationTree instance is also bound directly to be used for custom configuration analysis.
- Since:
- 04.05.2018
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConfigBindingModule(io.dropwizard.core.Configuration configuration, ConfigurationTree tree) Create configuration bindings module. -
Method Summary
Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
Constructor Details
-
ConfigBindingModule
Create configuration bindings module.- Parameters:
configuration- configuration instance.tree- parsed configuration
-
-
Method Details
-
configure
protected void configure()- Overrides:
configurein classcom.google.inject.AbstractModule
-