Hello! How can I make Guice create singletons by default?
At the moment ALL my classes are injected as singletons so if it was default scope I could remove all such lines from the module: bind(ProductsController.class).in(Singleton.class); bind(ProductService.class).in(Singleton.class); ... Look at the Spring for example - singleton is the default scope in Spring and it is correct, because we usually use injection for high level services, controllers and other singletons. If we need new instance every time we just use new, we do not usually need IOC for that. So it is very strange for me that Guice's default scope is "new". Can I change this? Thanks in advance!
-- You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-guice?hl=en.
