I created a new project in IntelliJ 13 using the Play 2 Module for Java project template and noticed that the # Ebean configuration
is missing from conf/application.conf
.
Being new to both Play Framework and IntelliJ I tried following the Play introductory video and got stuck where I need to extend the Ebean Model class. The problem is that the class doesn't appear in the Import class dialogue.
I've tried adding the source directory to these files to File → Project Structure → Libraries
but that didn't work.
If import play.db.ebean.Model;
is added IntelliJ complains with cannot resolve symbol 'db'
.
What do I need to do to have my project include the Play Ebean classes?
The method to enable ebean support has changed in play framework. Now it is done using an external dependency. From the documentation:
To enable it, add the Play Ebean plugin to your SBT plugins in project/plugins.sbt:
addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "1.0.0")
And then modify your build.sbt to enable the Play Ebean plugin:
lazy val myProject = (project in file("."))
.enablePlugins(PlayJava, PlayEbean)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With