昨天帮女朋友配置ssh框架的多数据源, 本以为对此已经很熟悉,配置完其他的错倒是还能接受,调了一下就好了。  唯独 Pre-bound JDBC Connection found! HibernateTransactionManager does not  这个异常着实浪费了我些时间。

也百度看到网上说是, 因为在代码中同时使用了jdbc和spring管理的hibernate 两种事务导致的,所以一开始重心放到了代码中,可是检查了N次代码没有问题啊, 最后实在不行找一个配置好的开始比对,试了几次才发现原来是配置事务的xml文件的头部不对,替换下面这个就好了。    原因:之前的配置少了schema/tx.xsd 和schma/tx/spring-tx.xsd和 schema/aop/spring-aop.xsd  来声明使用的事务。  这里记录一下希望可以帮到有同样异常的小伙伴。

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns="http://www.springframework.org/schema/beans"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd"
>

最新文章

  1. 多线程迭代之——LINQ to TaskQuery
  2. windows下UDP服务器和客户端的实现
  3. UVa 839 (递归方式读取二叉树) Not so Mobile
  4. ajax对一些没有接口的数据进行分析和添加方法
  5. bm25
  6. 《IT运维之道》
  7. [Leetcode][Python]36: Valid Sudoku
  8. git代码提交流程
  9. malloc &amp; free
  10. commitProperties方法
  11. JS/jQ常用宽高及应用
  12. tomcat设置文件编码
  13. idea Code激活
  14. abp添加动态菜单
  15. 结对编程项目——C语言实现WordCount Web化
  16. JVM调优之Tomcat启动加速(二)
  17. Python——Flask框架——模板
  18. 持续集成之④:GitLab触发jenkins构建项目
  19. beautiful number 数位dp
  20. Codeforces 670F - Restore a Number - [字符串]

热门文章

  1. linux学习 三 redhat
  2. 3.清除dns缓存的意义及命令?
  3. git 系统中 post-receive 钩子不能正常执行 git pull 解决方法
  4. QC使用常见问题
  5. monkey基本命令及脚本编写
  6. 八大排序算法java代码
  7. Node中的console控制台
  8. ajaxForm上传文件到本地服务器(封装)
  9. jqgrid 不能选中行, 每次点击单元格都自动选中第一行
  10. POJ3268【最短路】