我正在尝试编写一些 hibernate 示例,并且我发现了这个:
AnnotationConfiguration config = new AnnotationConfiguration();
Eclipse 说:已弃用
此外,当我运行应用程序时,我得到以下信息:
SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding.
SLF4J: Your binding is version 1.5.5 or earlier.
SLF4J: Upgrade your binding to version 1.6.x. or 2.0.x
我使用了这两个 Hibernate 包:
hibernate-annotations-3.4.0.GA
& hibernate-distribution-3.6.5.Final-dist
如何解决这个问题。
谢谢
最佳答案
对于您的第一个问题,请参阅帖子 Hibernate - AnnotationConfiguration deprecated
我猜 SLF4J 与此无关,尝试调查您的项目中包含哪些库,并放置正确的 SLF4J 版本。考虑this tutorial欲了解更多信息,例如
致以诚挚的问候。
关于java - Hibernate 问题中不推荐使用注释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6403891/