org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误
这个问题我找了好久,终于找到了
正确的写法:
<select id="getEmpByIdAndLastName" resultType="com.atguigu.mybatis.bean.Employee">
select id, last_name, gender, email from tbl_employee where id = #{id} and last_name = #{last_name}
</select>
错误的写法:
<select id="getEmpByIdAndLastName" resultType="com.atguigu.mybatis.bean.Employee">
select * from tbl_employee where id = #{id} and last_name = #{last_name}
</select>

Mapped Statements collection does not contain value for com.atguigu.mybatis.dao.DeparmentMapper.getDeptById

Cause: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='__frch_emp_0.last_name', mode=IN, javaType=class java.lang.String, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #1 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).

myBatis的binding错误:Invalid bound statement (not found)的更多相关文章

  1. mybatis使用时org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):的错误

    最近在使用mybatis时,出现了 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): 这 ...

  2. mybatis错误之org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    玩了MyBatis差不多有两年了,中间也玩过MyBatis-Plus,这个MyBatis-Plus其实与MyBatis的区别并不大.今天写博客业务代码的时候,犯一个初学者犯过的错误. 错误信息如下:o ...

  3. MyBatis错误--Invalid bound statement (not found)

    今天在开发项目的时候使用MyBatis发生错误:Invalid bound statement (not found) 具体错误信息: org.springframework.beans.factor ...

  4. Spring boot结合mybatis开发的报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    错误:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found),经过排查确定是没有找到xml的原因 ...

  5. idea 单元测试 mybatis spring-test 异常: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    因为在idea中必须在test下才能进行单元测试,所以进行单元测试时,ssm的项目会因为找不到resourece中的配置文件而报错 这里 org.apache.ibatis.binding.Bindi ...

  6. Mybatis笔记二:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    错误异常:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.test.dao.N ...

  7. 解决 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 以及MyBatis批量加载xml映射文件的方式

    错误 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 的出现,意味着项目需要xml文件来 ...

  8. 关于org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.atguigu.crud.dao.DepartmentMapper.insertSelective的错误

    今天我在使用mybatis逆向工程的时候,由于一个疏忽字打错了..结果花了一早上才把错误找全..广大小伙伴们一定要小心啊(能复制粘贴就别手打) 关于org.apache.ibatis.binding. ...

  9. MyBatis绑定错误[Invalid bound statement (not found)]

    如果出现: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 一般的原因是Mapper i ...

  10. MyBatis笔记----报错Exception in thread "main" org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.ij34.model.UserMapper.selectUser

    信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@41cf53f9: startup ...

随机推荐

  1. caffe 入门实例2 如何写一个模型

    占坑,记录如何写一个基于lenet5的模型,并进行测试.

  2. View Controller Programming Guide for iOS---(六)---Responding to Display-Related Notifications

    Responding to Display-Related Notifications 响应跟显示相关的通知 When the visibility of a view controller’s vi ...

  3. js跳转方法整理与自动刷新

    js方式的页面跳转1.window.location.href方式 <script language="JavaScript" type="text/javascr ...

  4. C++语言中的static关键字的作用是什么?

    在函数体,一个被声明为静态的变量在这一函数被调用过程中维持其值不变.在模块内(但在函数体外),一个被声明为静态的变量可以被模块内所用函数访问,但不能被模块外其它函数访问.它是一个本地的全局变量.在模块 ...

  5. UVA - 11552 Fewest Flops

    传送门: 题目大意:给你一个字符串,可以平均分成很多段,每一段之内的元素可以任意排序,最后再按原来的顺序把每一段拼起来,问最少的块数.(块:连续相同的一段字符成为一个块) 题解: 首先我们可以发现,每 ...

  6. 二分图最大匹配初探 By cellur925

    一.什么是二分图 首先它需要是一张无向图. 之后它需要同时满足两个条件:①它的N个点被分为两个集合,且这两个集合交集为空:②同一集合内的点之间没有边相连. 二.无向图是否为二分图的判定 引理:无向图是 ...

  7. 项目上线后出现Bug,该如何处理?

    项目在上线之后又出现了Bug,这让很多测试人员和开发人员头痛.但很多时候线上Bug普遍地存在,不可避免. 任何项目都存在未发现 Bug  和 已发现 Bug  两种情况,不存在没有 Bug的情况. 即 ...

  8. 洛谷 P3327 [SDOI2015]约数个数和 || Number Challenge Codeforces - 235E

    https://www.luogu.org/problemnew/show/P3327 不会做. 去搜题解...为什么题解都用了一个奇怪的公式?太奇怪了啊... 公式是这样的: $d(xy)=\sum ...

  9. 递推DP URAL 1244 Gentlemen

    题目传送门 /* 题意:给出少了若干卡片后的总和,和原来所有卡片,问少了哪几张 DP:转化为少了的总和是否能有若干张卡片相加得到,dp[j+a[i]] += dp[j]; 记录一次路径,当第一次更新的 ...

  10. httpclient 3.1跳过https请求SSL的验证

    一.因为在使用https发送请求的时候会涉及,验证方式.但是这种方式在使用的时候很不方便.特别是在请求外部接口的时候,所以这我写了一个跳过验证的方式.(供参考) 二.加入包,这里用的是commons- ...