首页 > Web开发 > 详细

hibernate 问题集

时间:2015-01-22 17:21:32      阅读:304      评论:0      收藏:0      [点我收藏+]

1、Could not obtain transaction-synchronized Session for current thread

解决方法:

在web.xml中加入如下配置:

 <filter>
        <filter-name>SpringOpenSessionInViewFilter</filter-name>
        <filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>SpringOpenSessionInViewFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

 

hibernate 问题集

原文:http://www.cnblogs.com/tyb1222/p/4241754.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!