草庐IT

java - Hibernate Entitymanager - "deprecated - use hibernate-core instead"是什么意思?

coder 2024-03-19 原文

我正在学习 hibernate jpa 教程,我需要使用 entitymanager。但是当我检查 mvnrepository 时,它说“已弃用 - 请改用 hibernate-core”。显然,如果没有 hibernate-entitymanager 作为依赖项,我的应用程序将无法工作(并且它无法同时使用 hibernate-core 和 hibernate-entitymanager 作为依赖项)。

有人可以帮助解释为什么它被“弃用”吗? https://mvnrepository.com/artifact/org.hibernate/hibernate-entitymanager

最佳答案

这意味着在新版本的 Hibernate 中,hibernate-entitymanager 组件已被弃用,您需要的所有功能都可以从 hibernate-core 组件中获得。链接到 Maven 中央存储库中 hibernate-core 组件的最新版本 here .将此依赖项添加到您的 pom.xml 文件。

关于java - Hibernate Entitymanager - "deprecated - use hibernate-core instead"是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38701340/

有关java - Hibernate Entitymanager - "deprecated - use hibernate-core instead"是什么意思?的更多相关文章

随机推荐