【问题标题】:Play Framework Activator ErrorPlay 框架激活器错误
【发布时间】:2015-10-07 23:25:33
【问题描述】:

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

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文件吗?
  • name := """UZAdmin""" version := "1.0-SNAPSHOT" lazy val root = (project in file(".")).enablePlugins(PlayJava) scalaVersion := "2.11 .6" libraryDependencies ++= Seq( javaJdbc, cache, javaWs ) // Play 提供了两种风格的路由器,一种期望它的动作被注入, // 另一种,遗留风格,静态地访问它的动作。 routesGenerator := InjectedRoutesGenerator

标签: playframework playframework-2.0 typesafe-activator


【解决方案1】:

您的 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

【讨论】:

    猜你喜欢
    • 2015-10-15
    • 1970-01-01
    • 2014-10-08
    • 2015-12-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-23
    • 1970-01-01
    相关资源
    最近更新 更多