标签:current inview pattern map ppi 打开 could att name
配置session有误:在项目中一般都是自动打开session和关闭session,需要在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>
这里的singleSession的默认值为true,也就是自动打开和关闭session
Could not obtain transaction-synchronized Session for current thread
标签:current inview pattern map ppi 打开 could att name
原文地址:https://www.cnblogs.com/doudou-123/p/9932759.html