Mybatic: Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain

错误:

### Error querying database.  Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.zhbit.Dao.impl.StudentDaoImpl.getStudentById

### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.zhbit.Dao.impl.StudentDaoImpl.getStudentById

出现此类错误主要有:

1.Mapper.xml namespace:接口名错误。或加l .xml

2.Mapper.xml中的方法和接口的mapping方法不对应

3.Mapper.xml没有加入mybatis-config.xml配置

4.Mapper.xml文件名和所写下的mapper名称不同

但是啊,我不是这个问题


selectone()方法里,应该是接口下的方法!!

猜你喜欢

转载自blog.csdn.net/mifan649191/article/details/80084785