Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

How to mix scala object based singleton and Guice DI

13 views
Skip to first unread message

nirav

unread,
Oct 10, 2018, 7:12:36 PM10/10/18
to Play Framework [deprecated]
Is there a way to achieve this?
https://stackoverflow.com/questions/37274533/inject-in-scala-object

I have an application which uses scala Objects to define sigletone services. Another app that uses guice. There is a common module for this service which defines some classes with DI. I can inejct them just fine in my 2nd app as that app is DI base as well. But I can't in first one as there is no DI there. 

One approach I see is  to create a scala Objects for classes in common module so that they can be accessed via application that relies on scala Object singletons. Any other suggestions?
Reply all
Reply to author
Forward
0 new messages