什麼是在Scala中使用構造函數注入爲控制器注入多個依賴的正確方法(2.4.x,它提供了開箱即用的DI) ?Play Framework:在控制器中使用構造函數注入注入多個依賴
例如,
class ExampleController @Inject() (serviceOne: ServiceOne, serviceTwo: ServiceTwo) extends Controller {
}
上面不會編譯僅表示一個或沒有構造ARG可以注入。
無法找到任何有關如何使這項工作的良好參考。任何幫助表示讚賞。謝謝。