org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)异常处理

出现这个异常的原因有以下几个

1.mapper的namespace和接口的完整路径不一致,可以检查一下org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)异常处理

2.接口名和对应的映射文件.xml名字不一致,比如:

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)异常处理

假如,接口名为第一个红色箭头的位置为Dept,那么和它的配置文件DeptMapper.xml不一致.

这个问题也是我之前遇到,找了很久才发现

3.接口中的方法名和配置文件中的id不一致也会报这个异常。这刚开始是猜测,现在已经测试成功