Spring——MyBatis整合的时候出现的错误:Exception in thread "main" org.apache.ibatis.binding.BindingException:

Exception in thread “main” org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): org.awen.mapper.StudentMapper.addStudentDao
出现的这个错误的原因,后面也会跟出来不同的信息。在我这里,排查了好久,自己发现。在这里插入图片描述
在这里插入图片描述
mapper.xml中的id一定要和mapper.java接口中的方法名字相对应起来。
mapper.xml中的id一定要和mapper.java接口中的方法名字相对应起来。
mapper.xml中的id一定要和mapper.java接口中的方法名字相对应起来。
重要的话说三遍。

猜你喜欢

转载自blog.csdn.net/guoguozgw/article/details/91429786