异常信息:

No CurrentSessionContext configured!

 

解决方法:

在hibernate.cfg.xml文件中的sessionFactory的配置节点中配置如下一段

<property name="current_session_context_class">thread</property>

相关文章:

  • 2022-12-23
  • 2021-06-29
  • 2022-01-13
  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-23
  • 2021-06-09
  • 2022-12-23
  • 2022-12-23
  • 2021-10-02
相关资源
相似解决方案