錯誤:Play ebean模塊已被替換爲外部Play ebean插件。構建playframework項目導致此錯誤
回答
Ebean轉移到Play 2.4中的外部依賴項。您可以在migration guide讀到它:
Ebean has been pulled out into an external project, to allow it to have a lifecycle independent of Play’s own lifecycle. The Ebean bytecode enhancement functionality has also been extracted out of the Play sbt plugin into its own plugin.
To migrate an existing Play project that uses Ebean to use the new external Ebean plugin, remove javaEbean from your libraryDependencies in
build.sbt
, and add the following toproject/plugins.sbt
:
addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "1.0.0")
After that, enable Ebean plugin for your project:
lazy val myProject = (project in file(".")) .enablePlugins(PlayJava, PlayEbean)
And finally, configure Ebean mapped classes as a list instead of a comma separated string (which is still supported but was deprecated):
ebean.default = ["models.*"]
ebean.orders = ["models.Order", "models.OrderItem"]
Additionally, Ebean has been upgraded to 4.5.x, which pulls in a few of the features that Play previously added itself, including the
Model
class. Consequently, the Play Model class has been deprecated, in favour of usingcom.avaje.ebean.Model
.
感謝我得到了出來放.i在build.sbt中添加了上述所有內容...... @ Steve chaloner – Heena
- 1. 建設maven項目導致錯誤
- 2. Linq導致構建錯誤
- 3. AdMobs導致項目錯誤
- 4. 連續構建VS2005和VS2008 C++項目導致LNK1104錯誤
- 5. 帶CI構建的c#項目 - 引用Oracle擴展導致構建錯誤
- 6. Maven使用庫項目構建Android項目,導致重複的R類錯誤
- 7. 如何導入/構建此項目?
- 8. 項目構建錯誤
- 9. WinObjC構建項目錯誤
- 10. 構建項目錯誤
- 11. 此示例WCF項目導致的錯誤 - VS 2008
- 12. 在Android NDK中構建hello-jni示例會導致錯誤「此項目中不存在默認目標幫助」
- 13. gmake使用sh.exe導致構建錯誤
- 14. Xamarin顏色導致構建錯誤
- 15. Kotlin構建導致JVM分段錯誤
- 16. 錯誤導致項目歐拉31
- 17. 使用svn與項目導致錯誤
- 18. 運行項目導致錯誤
- 19. Redmine - 導致錯誤的項目版本:
- 20. 如何修復QuickDialog項目上的此構建錯誤?
- 21. Android:在項目中創建測試項目會導致「構建過程中發生錯誤」,有什麼想法?
- 22. 使用build.xml重建cordova項目會導致錯誤
- 23. 創建新項目時導致ruby on rails openssl錯誤
- 24. 此sql查詢導致此錯誤的錯誤是什麼?
- 25. PlayFramework 2.5.3 Intellij IDEA中的項目創建錯誤15
- 26. XCode 7.3錯誤? - 自動構建項目
- 27. 構建項目時遇到錯誤?
- 28. 第一個Android項目構建錯誤
- 29. TFS構建中的Wix項目錯誤
- 30. 構建Android項目的Ant錯誤(com.android.sdklib.build.DuplicateFileException)
你的問題是廣泛的,添加的代碼示例你有什麼嘗試(Ebean配置,樣品型號),否則將被關閉,沒有任何答案 – biesior