I was wonder, why do we need to provide bindings explicitly sometimes and not other times in the module?
How does Guice decide when we need the binding and when not?
Is it because if a dependency has no multiple implementations and it is injected elsewhere as a dependencies it will be automatically bound as part of a dependency graph?
Thanks
You need a binding (either through a
bind, an@Providesmethod or an@ImplementedByannotation) for anything you want injected that is not a concrete class with a no-arg constructor or an@Injectannotated constructor.