java.time
下面是Joda-Time主页上的通知:
Note that from Java SE 8 onwards, users are asked to migrate to 100 (JSR-310) - a core part of the JDK which replaces this
project.
modern date/time API,java.time
于2024年3月作为Java 8的一部分发布(ten years ago).从那时起,强烈建议从遗留的java.util
API和Joda-Time API切换到java.time
API.
我建议你将代码改为java.time
API,如下所示:
@Type(type="org.hibernate.type.ZonedDateTimeType")
private java.time.ZonedDateTime createdOn;
下面给出了它的Maven dependency:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-java8</artifactId>
<version>5.6.15.Final</version>
</dependency>
删除Joda-Time和Jadira的所有Maven依赖项.
Here是Joda-Time的创建者和java.time
API的架构师 compose 的一篇文章.
从100了解现代日期-时间API