gpt4 book ai didi

java - 无法配置 Ebean Play Framework 2.5.x

转载 作者:行者123 更新时间:2023-12-01 08:53:20 27 4
gpt4 key购买 nike

我在为 Play Framework 2.5.x 配置 Ebean 时遇到问题。当我输入 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.

我已添加 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
)

关于java - 无法配置 Ebean Play Framework 2.5.x,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42225731/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com