2017-02-14 94 views
0

我在配置Ebean for Play Framework 2.5.x時遇到問題。我收到以下錯誤,當我鍵入SBT運行:無法配置Ebean Play Framework 2.5.x

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 
+0

如上所述,我得到以下錯誤: Play ebean模塊已被替換爲外部Play ebean插件。 有關詳細信息,請參閱https://playframework.com/documentation/2.4.x/Migration24。 項目加載失敗:(r)etry,(q)uit,(l)ast或(i)gnore? –

+0

你能從上到下顯示你的build.sbt嗎? – Mysterion

+0

我會編輯我原來的問題! –

回答

1

由於它的遷移指南中說:

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 
) 
+0

我完全錯過了,它現在有效。謝謝! –

+0

@JosefinNilsson,請提出答案 – Mysterion