Today finally finished the operation of the DAO layer, with an extremely excited mood, the unit test, in the last method, the last method, the start unit test will report the following error:
[2016-05-11 18:25:01,691] [WARN] Main bonecpconfig-Setidleconnectiontestperiodinminutes in place of Setidleconnectiontestperiod. This method has been deprecated. [2016-05-11 18:25:01,691] [WARN] main bonecpconfig-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 the 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 = 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 ]‘
and has been circulating, always thought is where accidentally modified the configuration file caused an error, I actually spent 2 hours to find the wrong reason.
The last of the old blood gushing out, is to be stupid to die, because it is too excited in the final Test SQL was wrong
<!--Modify Schedule ETag--><update id= "Updateetagbyprimarykey" parametertype= "Java.util.map" >update t_ based on primary key Scheduleetag = #{etag,jdbctype=varchar},last_update_time = #{lastupdatetime,jdbctype=bigint}where sid = #{sid, Jdbctype=varchar}and account_id =#{accountid,jdbctype=varchar}</update>
Remember your own mistakes!!!
Springmvc+mybatis Unit Test When main sqlsessionfactorybean-parsed configuration file: ' Class path resource ' infinite read XML file