简体   繁体   中英

Can't configure Ebean Play Framework 2.5.x

I have a problem configuring Ebean for Play Framework 2.5.x. I get the following error when I type sbt run:

Play ebean module has been replaced with an external Play ebean plugin. See https://playframework.com/documentation/2.4.x/Migration24 for details.

I have added javaJdbc as a Dependency and in my build.sbt I also have:

lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayEbean)

In application.conf:

ebean.default = ["models.*"]

And plugins.sbt:

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

Any idea on how to fix this? https://playframework.com/documentation/2.4.x/Migration24 Doesn't give any other information. Thanks!

EDIT Here's my full build.sbt:

name := """chatbot"""

version := "1.0-SNAPSHOT"

lazy val root = (project in file("."))
  .enablePlugins(PlayJava, PlayEbean)


scalaVersion := "2.11.7"

libraryDependencies ++= Seq(
  javaJdbc,
  cache,
  javaWs, 
  javaEbean, 
  evolutions
)


fork in run := true

As it is said in the migration guide:

To migrate an existing Play project that uses Ebean to use the new external Ebean plugin, remove javaEbean from your libraryDependencies in build.sbt

That's exactly, that you forgot to do, so in the dependencies section you need to have this:

libraryDependencies ++= Seq(
  javaJdbc,
  cache,
  javaWs,
  evolutions
)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM