play.api.libs
Support for binding actors with Guice.
Mix this trait in with a Guice AbstractModule to get convenient support for binding actors. For example:
class MyModule extends AbstractModule with AkkaGuiceSupport { def configure = { bindActor[MyActor]("myActor") } }
Then to use the above actor in your application, add a qualified injected dependency, like so:
class MyController @Inject() (@Named("myActor") myActor: ActorRef) extends Controller { ... }
Support for binding actors with Guice.
Mix this trait in with a Guice AbstractModule to get convenient support for binding actors. For example:
Then to use the above actor in your application, add a qualified injected dependency, like so: