nested exception is org.hibernate.HibernateException: No Session found for current thread

spring+hibernate集成是出現 No Session found for current thread問題。spring

查了一下相關資料,才知道,原來要在spring中使用Hibernate的Session,須要在配置文件中申明事務。全部的操做都必須在事物中進行hibernate

相關文章
相關標籤/搜索