springMVC+mybatis 进行单元测试时 main SqlSessionFactoryBean - Parsed configuration file: 'class path resource' 无限的读取xml文件
今天终于写完的Dao层的操作,怀着无比激动的心情,进行单元测试,就在最后一个方法,对的就是最后一个方法,启动单元测试就会报以下错误:
[2016-05-11 18:25:01,691] [WARN ] main BoneCPConfig - Please use setIdleConnectionTestPeriodInMinutes in place of setIdleConnectionTestPeriod. This method has been deprecated.
[2016-05-11 18:25:01,691] [WARN ] main BoneCPConfig - Please use setIdleMaxAgeInMinutes in place of setIdleMaxAge. This method has been deprecated.
[2016-05-11 18:25:01,691] [WARN ] main BoneCPConfig - releaseHelperThreads has been deprecated -- it tends to slow down your application more.
[2016-05-11 18:25:01,753] [DEBUG] main SqlSessionFactoryBean - Parsed configuration file: 'class path resource [mybatis.xml]'
[2016-05-11 18:25:01,759] [DEBUG] main BoneCPDataSource - JDBC URL = jdbc:mysql://10.10.8.150:8066/CALENDAR?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true, Username = calendar, partitions = 1, max (per partition) = 5, min (per partition) = 2, idle max age = 20 min, idle test period = 240 min, strategy = DEFAULT
[2016-05-11 18:25:02,283] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\AccessTokenInfoMapper.xml]'
[2016-05-11 18:25:02,302] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\AttendeeMapper.xml]'
[2016-05-11 18:25:02,312] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\BindingUserMapper.xml]'
[2016-05-11 18:25:02,328] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\PublicLabelMapper.xml]'
[2016-05-11 18:25:02,338] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\RepeatDeletedMapper.xml]'
[2016-05-11 18:25:02,385] [DEBUG] main SqlSessionFactoryBean - Parsed configuration file: 'class path resource [mybatis.xml]'
[2016-05-11 18:25:02,402] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\AccessTokenInfoMapper.xml]'
[2016-05-11 18:25:02,415] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\AttendeeMapper.xml]'
[2016-05-11 18:25:02,422] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\BindingUserMapper.xml]'
[2016-05-11 18:25:02,433] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\PublicLabelMapper.xml]'
[2016-05-11 18:25:02,441] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\RepeatDeletedMapper.xml]'
[2016-05-11 18:25:02,470] [DEBUG] main SqlSessionFactoryBean - Parsed configuration file: 'class path resource [mybatis.xml]'
[2016-05-11 18:25:02,486] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\AccessTokenInfoMapper.xml]'
[2016-05-11 18:25:02,496] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\AttendeeMapper.xml]'
[2016-05-11 18:25:02,502] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\BindingUserMapper.xml]'
[2016-05-11 18:25:02,511] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\PublicLabelMapper.xml]'
[2016-05-11 18:25:02,518] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\RepeatDeletedMapper.xml]'
[2016-05-11 18:25:02,541] [DEBUG] main SqlSessionFactoryBean - Parsed configuration file: 'class path resource [mybatis.xml]'
[2016-05-11 18:25:02,561] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\AccessTokenInfoMapper.xml]'
[2016-05-11 18:25:02,571] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\AttendeeMapper.xml]'
[2016-05-11 18:25:02,578] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\BindingUserMapper.xml]'
[2016-05-11 18:25:02,587] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\PublicLabelMapper.xml]'
[2016-05-11 18:25:02,594] [DEBUG] main SqlSessionFactoryBean - Parsed mapper file: 'file [D:\work\calendarApi\target\classes\com\cn21\calendar\dao\config\RepeatDeletedMapper.xml]'
[2016-05-11 18:25:02,617] [DEBUG] main SqlSessionFactoryBean - Parsed configuration file: 'class path resource [mybatis.xml]'
并且一直循环下去,一直以为是哪里不小心修改了配置文件导致出错,我居然花费了2个小时找出错原因。
最后一口老血喷薄而出,对 就是被自己蠢死的,原因就是因为太兴奋在最后的一个测试中sql写错了
<!-- 根据主键修改日程etag -->
<update id="updateEtagByPrimaryKey" parameterType="java.util.map">
update t_schedule set(当时自己没写这个set)
etag = #{etag,jdbcType=VARCHAR},
last_update_time = #{lastUpdateTime,jdbcType=BIGINT}
where sid = #{sid,jdbcType=VARCHAR}
and account_id =
#{accountId,jdbcType=VARCHAR}
</update>
纪念一下自己的错!!!
springMVC+mybatis 进行单元测试时 main SqlSessionFactoryBean - Parsed configuration file: 'class path resource' 无限的读取xml文件的更多相关文章
- 读取xml文件"分析 EntityName 时出错"的解决方案
在涉及到xml与xslt编程的过程中,经常会碰到"分析 EntityName 时出错"的提示,这个不是程序错误,是因为xml文件中使用了一些特殊符号导致的. XML 节点中不 ...
- SpringMVC + Mybatis + Shiro + ehcache时缓存管理器报错。
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' ...
- springboot整合mybatis时无法读取xml文件解决方法(必读)
转 http://baijiahao.baidu.com/s?id=1588136004120071836&wfr=spider&for=pc 在springboot整合myba ...
- 在使用simplexml_load_file()函数读取xml文件时遇到<![CDATA[]]>,怎么让其进行解析
simplexml_load_file ( '1394.xml', 'SimpleXMLElement', LIBXML_NOCDATA ); 使用这个函数里面的这两个参数
- 记录:springmvc + mybatis + maven 搭建配置流程
前言:不会配置 spring mvc,不知道为什么那样配置,也不知道从何下手,那么看这里就对了. 在 IDEA 中搭建 maven + springmvc + mybatis: 一.在 IDEA 中首 ...
- mybatis 热部署xml文件(spring boot和springmvc两种方式)
参考:http://thinkgem.iteye.com/blog/2304557 步骤:1.创建两个java类 (1)MapperRefresh.java :用于刷新mapper (2)SqlS ...
- Spring+springmvc+Mybatis整合案例 annotation版(myeclipse)详细版
Spring+springmvc+Mybatis整合案例 Version:annotation版 文档结构图: 从底层开始做起: 01.配置web.xml文件 <?xml version=&qu ...
- Spring+springmvc+Mybatis整合案例 xml配置版(myeclipse)详细版
Spring+springmvc+Mybatis整合案例 Version:xml版(myeclipse) 文档结构图: 从底层开始做起: 01.配置web.xml文件 <?xml version ...
- (4)Maven快速入门_4在Spring+SpringMVC+MyBatis+Oracle+Maven框架整合运行在Tomcat8中
利用Maven 创建Spring+SpringMVC+MyBatis+Oracle 项目 分了三个项目 Dao (jar) Service (jar) Controller (web) ...
随机推荐
- 学习OpenStack之(5):在Mac上部署Juno版本OpenStack 四节点环境
0. 前沿 经过一段时间的折腾,终于在自己的Mac上装好了Juno版本的四节点环境.这过程中,花了大量的时间,碰到了许多问题,学到不少知识,折腾过不少其实不需要折腾的东西,本文试着来对这过程做个总结. ...
- HDU2191悼念512汶川大地震遇难同胞——珍惜现在,感恩生活[多重背包]
悼念512汶川大地震遇难同胞——珍惜现在,感恩生活 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Jav ...
- 嵌入式Linux驱动学习之路(九)Linux系统调用、驱动程序框架
应用程序通过open read write close 等函数来操作计算机硬件.类似是一个接口. 当应用程序调用这些接口程序时,计算机是如何进入内核的呢?这是经过了系统调用. 实际上当调用接口函数 ...
- 转: YAML 语言教程 from(阮一峰)
YAML 语言教程 from: http://www.ruanyifeng.com/blog/2016/07/yaml.html
- Android入门篇2-activity调用跟数据传递
一.activity调用 假设ActivityTest调用SecondActivity 1.显示调用 button1.setOnClickListener(new View.OnClickListen ...
- [转]Python 命令行参数和getopt模块详解
FROM : http://www.tuicool.com/articles/jaqQvq 有时候我们需要写一些脚本处理一些任务,这时候往往需要提供一些命令行参数,根据不同参数进行不同的处理,在Pyt ...
- 傻瓜看完都可以简单使用Git
作为当下最流行的版本控制系统,Git是一个分布式版本控制系统,跟SVN等集中式版本控制有很多使用上的不同.万事开头难,想要最快学会使用Git,最简单的就是下了客户端就直接去用,一边用一边学.本文手把手 ...
- springmvc集成shiro登录失败处理
一般的登录流程会有:用户名不存在,密码错误,验证码错误等.. 在集成shiro后,应用程序的外部访问权限以及访问控制交给了shiro来管理. shiro提供了两个主要功能:认证(Authenticat ...
- Python2.2-原理之类型和运算
此节来自于<Python学习手册第四版>第二部分 一.Python对象类型(第4章) 1. Python可以分解成模块.语句.表达式以及对象:1.程序由模块构成:2.模块包含语句:3.语句 ...
- 如何用 Nodejs 分析一个简单页面
本文目的 在浏览器地址栏中输入 localhost:3000,在页面显示 博客园首页 的 20 篇文章标题. 过程分析 首先需要端口的监听,这就需要引入 Node 中最重要的模块之一 express. ...