摘要: spring与hibernate整合报错org.hibernate.HibernateException: Could not obtain transaction-synchronized Session for current thread org.springframework.orm.... 阅读全文
posted @ 2015-09-10 10:04 -.-| 阅读(893) 评论(0) 推荐(0) 编辑
摘要: 当 Hibernate 和 Spring 整合时,在 Spring 中指定的 Hibernate.cfg.xml 文件内容中要注释掉以下内容: thread -->这样,才能将 Hibernate 的 session 交给 Spring 来管理,而 Spring 才能使用切面方法,对 DAO 中的方... 阅读全文
posted @ 2015-09-10 09:33 -.-| 阅读(666) 评论(0) 推荐(0) 编辑