• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
时光里的赶路人
博客园    首页    新随笔    联系   管理    订阅  订阅
解决org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)问题

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)问题出现的原因:

1.mapper和xml的文件名不一致

2.xml里面的命名空间路径错误:

<mapper namespace="com.***.base.mapper.***">

 

Mapper接口开发需要遵循以下规范:
  1. Mapper.xml文件中的namespace与mapper接口的类路径相同。

  2. Mapper接口方法名和Mapper.xml中定义的每个statement的id相同

  3. Mapper接口方法的输入参数类型和mapper.xml中定义的每个sql 的parameterType的类型相同

  4. Mapper接口方法的输出参数类型和mapper.xml中定义的每个sql的resultType的类型相同

posted on 2020-11-04 18:41  吹风哪页就哪页  阅读(210)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3