Ebean missing in Play 2 module for Java

I created a new project in IntelliJ 13 using the Play 2 Module template for Java, and noticed what was # Ebean configurationmissing in conf/application.conf.

Being new to both the Play Framework and IntelliJ, I tried to follow the introductory video on Play and got stuck where I need to extend the Ebean Model class. The problem is that the class does not appear in the Import dialog box.

I tried to add the source directory to these files in File → Project Structure → Libraries, but this did not work.

If import play.db.ebean.Model;added, IntelliJ complains about cannot resolve symbol 'db'.

What do I need to do so that my project includes Play Ebean classes?

+4
source share
2

ebean . . :

, Play Ebean SBT /plugins.sbt:

addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "1.0.0")

build.sbt, Play Ebean:

lazy val myProject = (project in file("."))
  .enablePlugins(PlayJava, PlayEbean)
+8

build.sbt , "javaEbean" :

libraryDependencies ++= Seq(
  javaJdbc,
  javaEbean
}

"play clean compile" "play idea" .

+4

Source: https://habr.com/ru/post/1529049/


All Articles