【发布时间】:2017-12-11 05:03:49
【问题描述】:
我正在将 hibernate 3.x 迁移到最新版本 5.x,我发现许多问题需要一些帮助。
- SessionFactory.evict() - 我的代码使用了我在 5.x 中看不到的 SessionFactory.evict()。我应该用什么替换此代码? HibernateTemplate.evict()?
- 在 spring config xml 中将 AnnotationSessionFactoryBean 更改为 LocalSessionFactoryBean。 AnnotationSessionFactoryBean 具有 configurationClass 和 namingStrategy 属性。这些应该用什么代替?
- 类 HibernateInterceptor 在 spring config xml 中使用,现在在 hibernate5 包下的 spring 4.x 中找不到。
- Hibernate 中缺少 ConnectionProvider.configure()。
我正在使用, 春天 - 4.3.9.RELEASE 休眠 - 5.2.10.Final
【问题讨论】:
标签: migration hibernate-5.x hibernate3