关于playframework:Play框架激活器错误

Play Framework Activator Error

创建新项目后无法运行激活器命令

1
2
3
4
5
6
7
raghul@raghul-Inspiron-N4010:~/Documents/activator-dist-1.3.5/UZAdmin$ activator
[info] Loading project definition from /home/raghul/Documents/activator-dist-1.3.5/UZAdmin/project
/home/raghul/Documents/activator-dist-1.3.5/UZAdmin/build.sbt:17: error: not found: value routesGenerator
routesGenerator := InjectedRoutesGenerator
^
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?

我的build.sbt文件:

1
2
3
4
5
6
7
8
9
10
11
12
13
name :="""UZAdmin"""

version :="1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayJava)

scalaVersion :="2.11.6"

libraryDependencies ++= Seq( javaJdbc, cache, javaWs )

// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator


您的build.sbt缺少导入:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import play.sbt.routes.RoutesKeys._

name :="""UZAdmin"""

version :="1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayJava)

scalaVersion :="2.11.6"

libraryDependencies ++= Seq( javaJdbc, cache, javaWs )

// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator