hibernate 问题集

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>
上一篇:Kafka 0.11新功能介绍:空消费组延迟rebalance


下一篇:比hive快10倍的大数据查询利器presto部署