![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring
msidolphin
菜鸡
展开
-
SpringMVC错误记录
Could not obtain transaction-synchronized Session for current thread在junit下测试是没有问题的,但是在springmvc下就会抛出异常:无法为当前线程获取同步sessionorg.hibernate.HibernateException: Could not obtain transaction-synchronized Ses原创 2017-06-26 18:23:21 · 402 阅读 · 0 评论 -
Spring4整合Hibernate4.3
Spring还没学完,先整合Hibernate玩玩… 整合Hibernate所需jar包 如果缺少了spring-orm jar包 如果缺少了spring-tx jar包 Spring核心配置文件 方式一:将hibernate.cfg.xml的内容都迁移到Spring配置文件中 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns=原创 2017-06-24 17:53:24 · 518 阅读 · 0 评论