Question

I am a beginner in playframework, and I have a problem with import play.db.ebean.*; because no sees it.

  • db.default.driver=org.h2.Driver
  • db.default.url="jdbc:h2:mem:play"
  • ebean.default="models.*"

I have uncommented lines in file application.conf, but still not working. This is my build.sbt

import play.Project._
name := """play2bars-java"""
version := "1.0-SNAPSHOT"

libraryDependencies ++= Seq(
  javaJdbc,
  javaEbean,
    "org.webjars" %% "webjars-play" % "2.2.0",
    "org.webjars" % "bootstrap" % "2.3.1")


playJavaSettings
Was it helpful?

Solution 2

It works. I created a project in the console play and work. Previously, I created a project in typesafe activator "[basics] Hello Play Framework (Java Only)" and did not work

OTHER TIPS

Does your build.sbt file contain the javaEbean dependancy?

libraryDependencies ++= Seq(
    javaJdbc,
    javaEbean,
    "org.webjars" %% "webjars-play" % "2.2.0", 
    "org.webjars" % "bootstrap" % "2.3.1")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top