【发布时间】:2014-09-10 10:59:01
【问题描述】:
我有:
- 主要项目
- 名为“购物”的子项目
我想在子项目中使用来自主项目的视图。 我的子项目控制器代码:
package controllers.shopping;
public class Application extends Controller {
public static Result index() {
return ok(views.html.confirmation.render("ok"));
}
}
还有我的主要构建文件
lazy val shopping = project.in(file("modules/shopping"))
val main = project.in(file("."))
.dependsOn(shopping).aggregate(shopping)
我在子模块 common 中的模型类:
@Entity
public class AppMode {
public static AppMode getCurrentConfigurationEntry() {
return JPA.em().find(AppMode.class, 1L);
}
}
【问题讨论】:
标签: java scala views playframework-2.1 subproject