mybatis报错Cannot create PoolableConnectionFactory

junit测试时候   连接数据库报错Cannot create PoolableConnectionFactory (Io 异常: The Network Adapter could not establish the connection) 

原因是没有把mybatis.xml拷贝到target > test-classes > 文件夹下

applicationContext也要拷贝到这个文件夹下myeclipse不会自动拷贝

posted @ 2016-04-28 11:22  冰镇da熊猫  阅读(625)  评论(0)    收藏  举报