spring orm 4.0.6中的HibernateTemplate缺少saveOrUpdateAll [英] HibernateTemplate in spring orm 4.0.6 is missing saveOrUpdateAll

查看:176
本文介绍了spring orm 4.0.6中的HibernateTemplate缺少saveOrUpdateAll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图将我们的应用程序从spring 2.5.6迁移到最新版本的spring 4.0.6。我遇到的一个问题是HibernateTemplate缺少saveOrUpdateAll。我可以手动更改它,但我需要将它关闭200个文件。我不知道为什么Spring删除它而不是废弃它。任何人都有解决方法吗?我相信这是痛苦迁移的开始。

解决方案

从2.5到4.0是一个非常大的跳跃。而且Spring DID 弃用了该方法。如果您查看 API for Spring 3 ,该方法在Spring 4中被标记为已弃用并完全删除。甚至在Spring 2.5中,它也被弃用, a href =http://docs.spring.io/spring-framework/docs/2.5.6/api/org/springframework/orm/hibernate3/HibernateOperations.html#saveOrUpdateAll%28java.util.Collection%29 = nofollow> here。



因此,在您的Spring 2.5.6项目中,您已经使用了已弃用的方法。


I am trying to migrate our app from spring 2.5.6 to recent version of spring which is 4.0.6. One of the issues I faced is HibernateTemplate is missing saveOrUpdateAll. I could change it manually but I need to change it close 200 files. I don't know why Spring removed it instead of deprecating it. Anyone have workaround for this? I believe this is the starting of painful migration.

解决方案

From Spring 2.5 to 4.0 is quite a big jump. And Spring DID deprecate that method. If you look at the API for Spring 3, that method has been marked as deprecated and removed completely in Spring 4. Even more, in Spring 2.5 it was, also, deprecated, see here.

So, in your Spring 2.5.6 project you were already using a deprecated method.

这篇关于spring orm 4.0.6中的HibernateTemplate缺少saveOrUpdateAll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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