1 2 3 4 5 6 7 8 9
package akka import org.aspectj.lang.Aspects trait ActorSystemHolder { lazy val actorSystemAspect = Aspects.aspectOf(classOf[ActorSystemAspect]) lazy val actorSystem = actorSystemAspect.currentActorSystem lazy implicit val dispatcher = actorSystem.dispatcher }