如何仅导入特定于Hibernate的注释,例如@CreationTimestamp@UpdateTimestamp?

如何仅导入特定于Hibernate的注释,例如@CreationTimestamp@UpdateTimestamp?,hibernate,jakarta-ee,Hibernate,Jakarta Ee,在纯JEE webapp中,即打包为war/ear部署在JBoss EAP 6.4.x上,如何在pom.xml中导入对Hibernate注释的最小依赖性 以前有一个hibernate-annotations.jar,但是这个人工制品从2010年或者2008年开始就没有更新过 原因是在@CreationTimestamp和@UpdateTimestamp中使用这些特定于Hibernate的注释(JPA中不支持) 这里的用例:但是如果你添加注释,你需要使用hibernate作为你的JPA提供者,否则

在纯JEE webapp中,即打包为war/ear部署在JBoss EAP 6.4.x上,如何在pom.xml中导入对Hibernate注释的最小依赖性

以前有一个hibernate-annotations.jar,但是这个人工制品从2010年或者2008年开始就没有更新过

原因是在@CreationTimestamp和@UpdateTimestamp中使用这些特定于Hibernate的注释(JPA中不支持)


这里的用例:

但是如果你添加注释,你需要使用hibernate作为你的JPA提供者,否则它们会被忽略-所以你最好添加整个hibernate作为依赖项。当然JPA提供者是hibernate,JEE服务器是JBoss!!!