mybatis 入门练习项目报错:
### Error updating database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for c***********ent
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for c***********ent
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
at ………………
原因在于session执行的映射文件名错误,与映射文件中<mapper namespace="***********">不一样
// Test.java
SqlSession session = factory.openSession();
session.insert("com.lee.dao.IStudentMapper.saveStudent"); // 映射文件路径
<!-- StuMapper.xml -->
<mapper namespace="com.lee.dao.IStudentMapper">