使用 Spring 3.1 和 Hibernate 4 时替换 IdTransferringMergeEventListener
org.springframework.orm.hibernate3.support.IdTransferringMergeEventListener 是否有 Hibernate 4 版本?
我正在尝试将 Spring 3.0.x + Hibernate 3.6 应用程序升级到 Spring 3.1 + Hibernate 4,但似乎找不到如何更新它。
这在我的 applicationContext 中特别引用,如下所示:
<property name="eventListeners">
<map>
<entry key="merge">
<bean
class="org.springframework.orm.hibernate3.support.IdTransferringMergeEventListener" />
</entry>
</map>
</property>
保持原样会导致异常:
Caused by: java.lang.ClassNotFoundException: org.hibernate.event.def.DefaultMergeEventListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
大概是因为 Hibernate 4 不再具有类 DefaultMergeEventListener
提前致谢。
Is there a Hibernate 4 version of org.springframework.orm.hibernate3.support.IdTransferringMergeEventListener
?
I'm attempting to upgrade my Spring 3.0.x + Hibernate 3.6 app to Spring 3.1 + Hibernate 4 but can't seem to find how to update this.
This specifically is referenced in my applicationContext as so:
<property name="eventListeners">
<map>
<entry key="merge">
<bean
class="org.springframework.orm.hibernate3.support.IdTransferringMergeEventListener" />
</entry>
</map>
</property>
Just leaving it as is causes an exception:
Caused by: java.lang.ClassNotFoundException: org.hibernate.event.def.DefaultMergeEventListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
presumably because Hibernate 4 does not have the class DefaultMergeEventListener
anymore
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看起来该类已移至 org.hibernate.event.internal.DefaultMergeEventListener
it looks like the class moved to
org.hibernate.event.internal.DefaultMergeEventListener
Spring 人员决定不在 Hibernate 4 中实现此功能
来自 Spring 错误报告: https://jira .springsource.org/browse/SPR-9634
The Spring folks decided not to implement this for Hibernate 4
From bug report in spring: https://jira.springsource.org/browse/SPR-9634