解决org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): cn.**.**.dao.***Mapper.findAllUser
报错
在mybatis中dao接口与mapper配置文件在做映射绑定的时候出现问题,简单说,就是接口与xml要么是找不到,要么是找到了却匹配不到。
- 检查xml文件中namespace 与接口是否匹配
- 入参出参的type 类型是否正确
- 各个注解检查一下如 :@mapper
- maven重新编译依赖,clean install可能就好了
- application配置文件中是否缺少此配置
mybatis.mapper-locations=classpath:mapper/*.xml
mybatis.configuration.map-underscore-to-camel-case=true
不足之处请指出
转发引用请注明原文地址