I am migrating my application to Play 2.5 and I have the following issue:
import play.modules.reactivemongo.ReactiveMongoApi
trait Foo {
override def reactiveMongoApi: ReactiveMongoApi = current.injector.instanceOf[ReactiveMongoApi]
...
}
object Foo extends Foo
As current
is now deprecated, I would like to replace it. However, I can't use @Inject() (val reactiveMongoApi: ReactiveMongoApi)
as I am in a Trait.
How am I supposed to do it ?