The order in which modules are added is significant. Subsequent modules can override the bindings of previous modules. This is a very useful technique for augmenting/customising the functionality provided by modules. Many modules provide extensive bindings to facilitate such overriding.
Bindings added via the {@code bind()} and {@code provider()} methods always have the highest precedence, regardless of order.That is, non module bindings can always override module bindings regardless of whether the module is added before or after the non module binding.
Added modules can implement the {@link HandlerDecoratingModule} interface to facilitate adding handlers implicitly to the handler chain. @see Guice#builder(ratpack.launch.LaunchConfig) @see HandlerDecoratingModule
|
|