SpringMVC4+Hibernate4运行报错Could not obtain transaction-synchronized Session for current thread
来源:互联网 发布:杨幂假唱知乎 编辑:程序博客网 时间:2024/05/21 10:10
获取session时使用getCurrentSession()会报上面的错误,解决方法就是:
在web.xml中增加以下的filter <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>
阅读全文
0 0
- SpringMVC4+Hibernate4运行报错Could not obtain transaction-synchronized Session for current thread
- SpringMVC4+Hibernate4运行报错Could not obtain transaction-synchronized Session for current thread
- SpringMVC4+Hibernate4运行报错Could not obtain transaction-synchronized Session for current thread
- SpringMVC4+Hibernate4运行报错Could not obtain transaction-synchronized Session for current thread
- SpringMVC4+Hibernate4运行报错Could not obtain transaction-synchronized Session for current thread
- SpringMVC4+Hibernate4运行报错Could not obtain transaction-synchronized Session for current thread
- SpringMVC4+Hibernate4运行报错Could not obtain transaction-synchronized Session for current thread
- Hibernate4中使用getCurrentSession报Could not obtain transaction-synchronized Session for current thread
- Hibernate4中使用getCurrentSession报Could not obtain transaction-synchronized Session for current thread
- 报错 Could not obtain transaction-synchronized Session for current thread
- spring整合hibernate报错:Could not obtain transaction-synchronized Session for current thread
- Hibernate报错:Could not obtain transaction-synchronized Session for current thread
- spring4+hibernate4+junit整合问题 Could not obtain transaction-synchronized Session for current thread的问题
- springmvc+spring4+hibernate4整合Could not obtain transaction-synchronized Session for current thread
- Hibernate4 提示Could not obtain transaction-synchronized Session for current thread
- 【Hibernate】Could not obtain transaction-synchronized Session for current thread
- Could not obtain transaction-synchronized Session for current thread
- Could not obtain transaction-synchronized Session for current thread
- Android学习笔记0--配置1--gradle
- Java服务端推送和web端推送——GoEasy免费推送服务
- Codeforces 754A Lesha and array splitting
- AngularJs日常bug修复记录: 使用第三方插件按需加载(oclazyload简单使用)
- flv2fmp4解决方案
- SpringMVC4+Hibernate4运行报错Could not obtain transaction-synchronized Session for current thread
- I2C总线信号时序总结
- 关于 git的一些常用 需要的时候看看
- 解决MAC用HDMI连接显示器就没声音问题
- jqery和js如何判断checkbox是否选中
- Android自定义Toast样式
- JAVA几种常见编码格式
- 使用xshell连接Linux(centos7)安装oracle11g
- 348. Design Tic-Tac-Toe