为什么不推荐使用hibernate-java8(hibernate 5.x)jar? [英] Why is hibernate-java8 (hibernate 5.x) jar shown deprecated?

查看:129
本文介绍了为什么不推荐使用hibernate-java8(hibernate 5.x)jar?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hibernate 5及更高版本通过jar"hibernate-java8"支持Java8 DateTime Api. br>为什么要获得对Java8的休眠支持,为什么不建议使用hibernate-java8 jar?

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?

推荐答案

您可以看到《迁移指南》 (适用于Hibernate).它指定

You can see the Migration Guide for Hibernate. It specifies that

Hibernate 5.2使用Java 8 JDK构建,并且在以下位置需要Java 8 JRE 运行时(我们正在研究Java 9是否也可以运行).这有 许多含义:

Hibernate 5.2 is built using Java 8 JDK and will require Java 8 JRE at runtime (we are investigating whether Java 9 will also work). This has a number of implications:

hibernate-java8模块已合并到hibernate-core和 现在本地支持Java 8日期/时间类型.

The hibernate-java8 module has been merged into hibernate-core and the Java 8 date/time types are now natively supported.

(待办事项)对Java 8可选的支持

(todo) support for Java 8 Optional

(待办事项)是否支持其他Java 8功能?

(todo) support for other Java 8 features?

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

The hibernate-java8 module has been removed; that functionality has been consolidated into hibernate-core.

对于 hibernate-java8 参见此票证进行解释,

For hibernate-java8 see this ticket for explanation,

由于这依赖于Java 8,因此Hibernate仍保持兼容性 回到Java 6,添加了一个新的模块hibernate-java8来隔离 Java 8与这些类的兼容性.我们将折叠课 一旦我们为一个Java 8设置了基准,就从这个模块进入了hibernate-core.

As this relies on Java 8 and Hibernate still maintains compatibility back to Java 6, a new module hibernate-java8 was added to isolate the Java 8 compatibility to just these classes. We will fold the classes from this module into hibernate-core once we baseline one Java 8.

由于hibernate不再维护hibernate-java8,因此您可以看到hibernate-java8只是一个空的占位符. Github & JIRA详细信息.

Since hibernate no longer maintains the hibernate-java8 and you can see that hibernate-java8 is nothing more than an empty placeholder. Github & JIRA Detail.

因此,由于功能已合并到hibernate-core中; hibernate-java8现在已贬值.

So, As the functionality has been merged into hibernate-core; hibernate-java8 now is depreciated.

我希望这能回答您的问题.

I hope this answer your queries.

这篇关于为什么不推荐使用hibernate-java8(hibernate 5.x)jar?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆