美文网首页
springboot中mapper找不到实现方法

springboot中mapper找不到实现方法

作者: 尧字节 | 来源:发表于2021-07-12 10:23 被阅读0次

报错信息如下:

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):  
xxxxx.xxx.method()

核对了:

1.  xml中的命名空间 结果一致
2. 方法名和返回类型均一致.
3. resultType和resultMap也配置没问题.
4. mapper的类名是不是public的.

一直没发现问题,最终找到原因是:

Mapper的接口名字和xml配置文件名不一致.

相关文章

网友评论

      本文标题:springboot中mapper找不到实现方法

      本文链接:https://www.haomeiwen.com/subject/lngfpltx.html