What’s the difference between
bind(FooImpl.class).in(Scopes.SINGLETON);
bind(Foo.class).to(FooImpl.class);
and
bind(Foo.class).to(FooImpl.class).in(Scopes.SINGLETON);
With Google Guice?
edit:
The second declaration create two instances on Singleton in a project I am working on.
Reference here
In reference to Google Guice documentation:
So, It’s possible to have two instances of
FooImplin the second way but not with the first way of writing the binding.