How would one do dependency injection in scala?
问题 I'm still at the beginning in learning scala in addition to java and i didn't get it how is one supposed to do DI there? can or should i use an existing DI library, should it be done manually or is there another way? 回答1: Standard Java DI frameworks will usually work with Scala, but you can also use language constructs to achieve the same effect without external dependencies. 回答2: A new dependency injection library specifically for Scala is Dick Wall's SubCut. Whereas the Jonas Bonér article