mybatis报错 Error building SqlSession.

Posted 山水之间

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mybatis报错 Error building SqlSession.相关的知识,希望对你有一定的参考价值。

今天配置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.的主要内容,如果未能解决你的问题,请参考以下文章

Gradle build Error 编译报错 ,不影响程序运行?

mybatis报错 Error instantiating interface com.atguigu.mybatis.dao.DepartmentMapper with invalid types

mybatis报错:Error setting null for parameter #1 with JdbcType OTHER

webpack run build 报错:ERROR in static/js/vendor.js from UglifyJs

OpenStack创建虚拟机VM报错 Instance building... 0% complete Error building instance

mybatis-generator代码生成报错?