首页 > 数据库技术 > 详细

mybatis报错 Error building SqlSession.

时间:2018-03-19 20:35:06      阅读:1130      评论:0      收藏:0      [点我收藏+]

今天配置mybatis的时候,遇到一个很粗心的错误,找了很久才找出来

Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:
### Error building SqlSession.
### The error may exist in com.easy/mapping/userMapper.xml
### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource com.easy/mapping/userMapper.xml

 

解决方法:把conf.xml文件下的<mapper>里的 resource="com.easy.mapping.userMapper.xml" 改为 resource="com/easy/mapping/userMapper.xml"

mybatis报错 Error building SqlSession.

原文:https://www.cnblogs.com/sszj/p/8604285.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!