播放框架激活器错误



新建项目后无法运行Activator命令

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文件:

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缺少一个导入:

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

相关内容

最新更新