无法访问游戏!内部演员系统

Jac*_*ter 1 scala sbt akka playframework-2.0

我正在遵循这里的文档,因为我想将Actors添加到应用程序提供的actor系统中.我尝试导入应用程序actor系统:

import play.libs.concurrent.Akka
Run Code Online (Sandbox Code Playgroud)

我正在使用sbt compile调用我的编译并收到以下错误

[error] app/controllers/Application.scala:9: object concurrent is not a member of package play.libs
[error] import play.libs.concurrent.Akka
[error]                  ^
[error] one error found
Run Code Online (Sandbox Code Playgroud)

CONF/pplication.conf

#Disable DBPlugin
dbplugin=disabled

#Disable DB evolutions
evolutionplugin=disabled

#Disable Eh Cache
ehcacheplugin=disabled


# Logger
# ~~~~~
# You can also configure logback (http://logback.qos.ch/), by providing a logger.xml file in the conf directory .

# Root logger:
logger.root=ERROR

# Logger used by the framework:
logger.play=INFO

# Logger provided to your application:
logger.application=DEBUG

akka.default-dispatcher.core-pool-size-max = 64
akka.debug.receive = on
Run Code Online (Sandbox Code Playgroud)

项目/ Build.scala

import sbt._
import Keys._
import PlayProject._

object ApplicationBuild extends Build {

    val appName         = "SomeCoolApp"
    val appVersion      = "1.0"

    val appDependencies = Seq(
      // Add your project dependencies here,
      "com.typesafe.akka" % "akka-actor" % "2.+"
    )

    val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA).settings(
      // Add your own project settings here      
    )

}
Run Code Online (Sandbox Code Playgroud)

Jac*_*ter 5

要访问Play!2.0内部演员系统,使用

import play.api.libs.concurrent.Akka.system
Run Code Online (Sandbox Code Playgroud)

有关正确的实现,请参阅API文档.