错误: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