大概分析一般使用了注解才会报这方面的错

1.没有在spring的ApplicationContext.xml中开启注解事务

<!-- 开启注解事务 -->
<tx:annotation-driven transaction-manager="txManager"/>

2.没有在方法上挂注解事务标签

报错解决:No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here的更多相关文章

  1. spring 管理事务配置时,结果 报错: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here这个异常

    java.lang.IllegalStateException: No Hibernate Session bound to thread, and configuration does not al ...

  2. spring事务管理出错。No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here

    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy ...

  3. org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here

    org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not a ...

  4. 出现No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here异常

    问题描述: public void save(BaseEntity baseEntity) { Session session = null; try { session = currentSessi ...

  5. 解决No Hibernate Session bound to thread, and configuration does not allow creat。。。

    applicationContext.xml配置 <?xml version="1.0" encoding="UTF-8"?> <beans ...

  6. No Hibernate Session bound to thread, and configuration does not allow creat

    No Hibernate Session bound to thread, and configuration does not allow creat 今天遇到这么一个错误,在网上差了很多都没有能解 ...

  7. Hibernate中解决No Hibernate Session bound to thread问题

    引用:忘了 首先是getCurrentSession()与openSession()的区别: 1.getCurrentSession()与openSession()的区别? * 采用getCurren ...

  8. org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not a

    如果出现了这个错误,看看在使用Hibernate的时候有没有在事务的环境下执行操作!

  9. org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not

    遇到这个问题之前,我去百度和谷歌去搜索了一下.发现各种说法.可是针对我的项目而言,也就是公司的项目而言,这个问题的根源并不是是网上所说的那样. 最后是通过自己的想法做測试得到了解决. 1.首先说说我的 ...

随机推荐

  1. ggplot2 legend图例的修改

    ggplot2中的legend包括四个部分: legend.tittle, legend.text, legend.key, legend.backgroud.针对每一部分有四种处理方式: eleme ...

  2. [HDU5727]Necklace(二分图最大匹配,枚举)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5727 题意:有N个阴珠子和N个阳珠子,特定序号的阴阳珠子放在一起会让阳珠子暗淡.现在问排放成一个环,如 ...

  3. 构建一个简单的Maven项目

    这里用Maven Archetype插件从空白开始创建简单的项目. 熟悉Maven 项目和Maven的核心概念. 关键词:构建生命周期(build lifecycle), Maven仓库(reposi ...

  4. jdk安装环境变量设置

    设置JAVA_HOME,点击新建,变量名:JAVA_HOME,变量值:D:\java\jdk1.7.0,即刚才jdk安装的路径.   设置CLASSPATH属性,变量名:CLASSPATH,变量值:. ...

  5. 3.27考试总结(hnoi难度)

    1 duel1.1 DescriptionK·⁄¶("“uƒ¢y%¥§H5|+ (?1’m" ’m·ø?1§z<k§⁄k<⁄§lm?0,1,2...§zg ‹‰ª«mS ...

  6. git :设置 object-c 的忽略文件

    使用 git 命令行来进行版本控制的时候, 需要设置忽略文件. 这里能找到所有语言的忽略文件的内容:https://github.com/github/gitignore OBJECT的忽略文件内容: ...

  7. PL/SQL 听课笔记

    PL/SQL: 知识回顾: SQL:  结构化查询语言: T-SQL:  microsoft sql语言: PL/SQL: Oracle sql语言: 变量命名规则: 1.首字母必须是字母,可以包含字 ...

  8. STRUTS2 嵌套循环

    <!--begin 类目循环 --> <s:iterator value="categories" id='i' begin="0" step ...

  9. iOS8 获取通知设置状态

    UIUserNotificationSettings *settings = [[UIApplication sharedApplication] currentUserNotificationSet ...

  10. 学习笔记day6:CSS3动画属性

    总结: 1: CSS动画:@keyframes  animation:ie10+:加-webkit前缀: animation 则是属于关键帧动画的范畴; 它本身被用来替代一些纯粹表现的javascri ...