这个异常说明参数没有加上@Param注解,加上这个注解就行了。

默认情况下mybatis把参数按顺序转化为[0, 1, param1, param2],也就是说#{0} 和 #{param1} 是一样的,都是取第一个参数,以此类推。

在mybatis的Map类中,方法参数为多个时,前面需要加上@Param注解

org.apache.ibatis.binding.BindingException: Parameter 'xxx' not found. Available parameters are [arg1, arg0, param1, param2]的更多相关文章

  1. SpringBoot整合Mybatis注解版---update出现org.apache.ibatis.binding.BindingException: Parameter 'XXX' not found. Available parameters are [arg1, arg0, param1, param2]

    SpringBoot整合Mybatis注解版---update时出现的问题 问题描述: 1.sql建表语句 DROP TABLE IF EXISTS `department`; CREATE TABL ...

  2. ### Cause: org.apache.ibatis.binding.BindingException: Parameter 'name' not found. Available parameters are [arg1, arg0, param1, param2]

    org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: org.apache.ib ...

  3. Springboot-001-解决nested exception is org.apache.ibatis.binding.BindingException: Parameter 'env' not found. Available parameters are [arg1, arg0, param1, param2]

    环境:Springboot + Mybatis + MySQL + VUE 场景: 前端发出数据比对请求,在服务后台与数据库交互时,接口提示错误信息如下所示: { "code": ...

  4. org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'userId' not found. Available parameters are [arg1, arg0, param1, param2]

    2018-06-27 16:43:45.552  INFO 16932 --- [nio-8081-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : ...

  5. org.apache.ibatis.binding.BindingException: Parameter '0' not found. Available parameters are [arg1, arg0, param1, param2]

    报错信息如下: org.apache.ibatis.binding.BindingException: Parameter '0' not found. Available parameters ar ...

  6. org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'username' not found. Available parameters are [1, 0, param1, param2]

    Spring+mybatis错误:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.bi ...

  7. org.apache.ibatis.binding.BindingException: Parameter 'start' not found. Available parameters are [1, 0, param1, param2]

    DEBUG 2018-05-30 08:43:26,091 org.springframework.jdbc.datasource.DataSourceTransactionManager: Roll ...

  8. Spring Boot中报错org.apache.ibatis.binding.BindingException: Parameter 'XXXX' not found. Available parameters are [0, 1, param1, param2]的解决办法

    我这里的报错信息显示: org.apache.ibatis.binding.BindingException: Parameter 'reqUsername' not found. Available ...

  9. Mybatis报错 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'parentCode' not found. Available parameters are [0, 1, param1, param2]

    orcal数据库使用mybatis接收参数,如果传的是多个参数,需要使用#{0},#{1},...等代替具体参数名,0 代表第一个参数,1 代表第二个参数,以此类推. 错误语句: <select ...

随机推荐

  1. shell实现批量创建交叉编译工具软链接

    在学习嵌入式过程中,常常用到交叉编译工具,而原本的交叉工具链比较长,不利于记忆以及使用, 解压后的交叉编译工具链如下图所示 为了更好的使用交叉编译工具与其他开发者保持一致,经常需要用到软链接. NAM ...

  2. webpack4.0高级

    环境变量 webpack --env.NODE_ENV=local --env.production --progress Tree Shaking 移除JS上下文字未被引用的代码 只支持ES6的im ...

  3. __new__构造方法

    """ 对象的创建过程:new创建 返回 模拟实例对象的创建过程. 为啥是静态方法? 先有new后来init.因为init是需要实例对象来调用的,需要一个实例对象和sel ...

  4. 在vue中使用Element的message组件

    在vue中使用Element的message组件 在vue文件中使用 this.$message({ message: "提示信息", type: "success&qu ...

  5. windows常用

    host文件位置:C:\Windows\System32\drivers\etc

  6. 【Http】keepalive

    http是现在web领域极其普遍的应用层传输协议, 目前常见的使用版本则是http1.1, 当然最先版本是http2.0. 传统的Http应用里都是一次TCP连接一次request.   image ...

  7. 返回字符串中最长连续相同字串的长度---正则实现与JavaScript实现

    JavaScript 实现 let str = 'AAABBAACCAAAADDE' function continuousString(str) { let finalObj = {} let te ...

  8. nlp总结

    中科院nlpir和海量分词(http://www.hylanda.com/)是收费的. hanlp:推荐基于CRF的模型的实现~~要看语料,很多常用词会被分错,所以需要词库支撑.目前最友好的开源工具包 ...

  9. 关于合并pdf文件出现的问题

    输出端出现以下问题: PdfReadWarning: Xref table not zero-indexed. ID numbers for objects will be 解决方案: import ...

  10. idea右键无run选项

    选中java 文件所在的package右键选中Mark Directory as---Sources  Root