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

时间:2012-03-26 07:49:37

标签: scala sbt akka playframework-2.0

我正在遵循文档here,因为我想将Actors添加到应用程序提供的actor系统中。我尝试使用以下命令导入应用程序actor系统:

import play.libs.concurrent.Akka

我使用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

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

项目/ 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      
    )

}

1 个答案:

答案 0 :(得分:5)

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

import play.api.libs.concurrent.Akka.system

有关正确的实施,请参阅API doc

相关问题