我有:
- 主要项目
- 名为“购物”的子项目
我想在子项目中使用来自主项目的视图。我的子项目控制器代码:
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);
}
}