【问题标题】:Hibernate 3.x to 5.x migration issuesHibernate 3.x 到 5.x 迁移问题
【发布时间】:2017-12-11 05:03:49
【问题描述】:

我正在将 hibernate 3.x 迁移到最新版本 5.x,我发现许多问题需要一些帮助。

  1. SessionFactory.evict() - 我的代码使用了我在 5.x 中看不到的 SessionFactory.evict()。我应该用什么替换此代码? HibernateTemplate.evict()?
  2. 在 spring config xml 中将 AnnotationSessionFactoryBean 更改为 LocalSessionFactoryBean。 AnnotationSessionFactoryBean 具有 configurationClassnamingStrategy 属性。这些应该用什么代替?
  3. HibernateInterceptor 在 spring config xml 中使用,现在在 hibernate5 包下的 spring 4.x 中找不到。
  4. Hibernate 中缺少 ConnectionProvider.configure()。

我正在使用, 春天 - 4.3.9.RELEASE 休眠 - 5.2.10.Final

【问题讨论】:

    标签: migration hibernate-5.x hibernate3


    【解决方案1】:

    你看到这张图片,然后在 github 上找到它。

    about version 5.2.9

    【讨论】:

    • 谢谢。您知道 HibernateInterceptor 的任何解决方案吗?
    • 对不起,很久没有回来。为什么不用mybatis?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-02-02
    • 1970-01-01
    • 1970-01-01
    • 2020-02-24
    • 2023-03-29
    • 1970-01-01
    相关资源
    最近更新 更多