为什么 hibernate-java8 (hibernate 5.x) jar 显示已弃用?

2024-01-12

Hibernate 5 and above supports Java8 DateTime Api through jar "hibernate-java8".
But the MavenRepository shows a message Deprecated - use hibernate-core instead) alongside the title of the hibernate-java8 jar.

Why is the hibernate-java8 jar called deprecated even though it is required to gain the hibernate support for java8?

maven repository hibernate-java8


您可以看到迁移指南 https://github.com/hibernate/hibernate-orm/wiki/Migration-Guide---5.2对于休眠。它指定

Hibernate 5.2 是使用 Java 8 JDK 构建的,并且需要 Java 8 JRE 运行时(我们正在研究 Java 9 是否也可以工作)。这有 一些影响:

hibernate-java8 模块已合并到 hibernate-core 中,并且 现在原生支持 Java 8 日期/时间类型。

(todo) 支持 Java 8 可选

(todo) 支持其他 Java 8 功能吗?

hibernate-java8 模块已被删除;该功能已合并到 hibernate-core 中。

For 休眠java8 https://hibernate.atlassian.net/browse/HHH-8844请参阅此票以获取解释,

由于这依赖于 Java 8 并且 Hibernate 仍然保持兼容性 回到Java 6,添加了一个新模块 hibernate-java8 来隔离 Java 8 只兼容这些类。我们将折叠课程 一旦我们为 Java 8 建立基线,就从这个模块进入 hibernate-core。

由于 hibernate 不再维护 hibernate-java8 并且您可以看到 hibernate-java8 无非是一个空的占位符。Github https://github.com/hibernate/hibernate-orm/tree/master/hibernate-java8/src/main/resources & 吉拉详情 https://hibernate.atlassian.net/browse/HHH-10883.

因此,由于该功能已合并到 hibernate-core 中; hibernate-java8 现在已弃用。

我希望这能回答您的疑问。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

为什么 hibernate-java8 (hibernate 5.x) jar 显示已弃用? 的相关文章

随机推荐