无法配置 Ebean Play Framework 2。5.x

Can't configure Ebean Play Framework 2.5.x

我在为 Play Framework 2 配置 Ebean 时遇到问题。5.x。当我输入 sbt 运行:

时出现以下错误

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

我已将 javaJdbc 添加为依赖项,在我的 build.sbt 中我还有:

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

在application.conf中:

ebean.default = ["models.*"]

和plugins.sbt:

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

知道如何解决这个问题吗? https://playframework.com/documentation/2.4.x/Migration24 不提供任何其他信息。谢谢!

编辑 这是我的完整 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

正如迁移指南中所说:

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

没错,你忘了做,所以在依赖项部分你需要有这个:

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