请给我一些建议。我正在关注这个: https ://www.playframework.com/documentation/2.2.x/SBTSubProjects
我做错了什么?我对子项目路线有错误:
shopping.routes:5: object Application is not a member of package controllers.shopping
我的购物路线:
GET /index controllers.shopping.Application.index()
GET /assets/*file controllers.shopping.Assets.at(path="/public", file)
我的 shopping.controllers.Application 类:
package controllers.shopping
import play.api._
import play.api.mvc._
import views.html._
public Class Application extends Controller {
public Result index() {
return ok("shopping");
}
}
我的主要 build.sbt 文件:
import play.Project._
name := "svp"
version := "2.0.0_(20140725)"
libraryDependencies ++= Seq(
javaJdbc,
javaJpa,
"org.hibernate" % "hibernate-entitymanager" % "3.6.9.Final",
"mysql" % "mysql-connector-java" % "5.1.27",
"org.mindrot" % "jbcrypt" % "0.3m",
cache
)
playJavaSettings
lazy val shopping = project.in(file("modules/shopping"))
lazy val main = project.in(file(".")).dependsOn(shopping).aggregate(shopping)