ReactiveMongoApiFromContext

Can be used for a custom application loader.

import play.api.ApplicationLoader
import play.modules.reactivemongo.ReactiveMongoApiFromContext

class MyApplicationLoader extends ApplicationLoader {
 def load(context: ApplicationLoader.Context) =
   new MyComponents(context).application
}

class MyComponents(context: ApplicationLoader.Context)
   extends ReactiveMongoApiFromContext(context) {
 lazy val router = play.api.routing.Router.empty
 override lazy val httpFilters = Seq.empty[play.api.mvc.EssentialFilter]
}

Value members

Constructors

def this(context: Context)

Concrete methods

final protected def ec: ExecutionContext

Deprecated and Inherited methods

@deprecated("Use devContext.map(_.sourceMapper) instead", "2.7.0")
Deprecated
Inherited from:
BuiltInComponents

Concrete fields

lazy val dbName: String
lazy override val strictMode: Boolean

Inherited fields

The API initialized according the current configuration

The API initialized according the current configuration

Inherited from:
ReactiveMongoApiComponents