这是我的代码:
class testActor extends Actor {
var test = "test2"
def receive = {
case "test" ⇒
"works"
}
}
def test = Action {
var test = "test"
val system = ActorSystem("MySystem")
val myActor = system.actorOf(Props[testActor.testActor], name = "testActor")
test = Await.result(myActor ? "test", Duration(1, TimeUnit.SECONDS))
}
我收到这条线的错误:
test = Await.result(myActor ? "test", Duration(1, TimeUnit.SECONDS))
错误是:
找不到参数超时的隐式值:akka.util.Timeout