我这里的报错信息显示:

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

原因:当只有一个参数时,Mapper中可以不使用@Param,但是当有多个参数的时候,要使用@Param。

原来的代码:

	@Select("select * from tz_user where " + GlobalConfigure.USER_AUTH_SQL_SUFFIX)
List<User> getAllUser(String reqUsername, String reqPasswd);

改成:

	@Select("select * from tz_user where " + GlobalConfigure.USER_AUTH_SQL_SUFFIX)
List<User> getAllUser(@Param("reqUsername") String reqUsername, @Param("reqPasswd") String reqPasswd);

就成功返回结果了。

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

  1. 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 ...

  2. 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].[/]       : ...

  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. ### 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 ...

  5. 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 ...

  6. org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'employeeId' not found. Available parameters are [page, map, param1, param2] 解决方法

    原因很简单就是没映射到接口添加 @Param 注解 ->@Param("map") 然后在mapper.xml map.employeeId 再次测试 已经解决 ->

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

    这个异常说明参数没有加上@Param注解,加上这个注解就行了. 默认情况下mybatis把参数按顺序转化为[0, 1, param1, param2],也就是说#{0} 和 #{param1} 是一样 ...

  8. 怪事年年有,今天特别多!org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'empno' not found. Available parameters are [emp, deptno, param1, param

    错误: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.Binding ...

  9. 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 ...

随机推荐

  1. ubuntu---记录.opencv多版本管理与切换

    首先当然准备两个不同版本opencv (比如2..9和3.1.0) cmake-gui 设置 CMAKE_INSTALL_PREFIX 安装路径:/usr/local/opencv2 安装路径 :/u ...

  2. notify()和 notifyAll()有什么区别?(未完成)

    notify()和 notifyAll()有什么区别?(未完成)

  3. Python程序打包工具PyInstaller

    Python程序执行 py文件:直接提供源码,需要使用者自行安装Python并且安装依赖的各种库 pyc文件:pyc文件是Python解释器可以识别的二进制码,是跨平台的,需要使用者安装相应版本的Py ...

  4. jQuery获取select元素选择器练习

    jQuery获取Select选择的Text和Value:语法解释: 1. $("#select_id").change(function(){//code...}); //为Sel ...

  5. Educational Codeforces Round 74 (Rated for Div. 2) C. Standard Free2play

    链接: https://codeforces.com/contest/1238/problem/C 题意: You are playing a game where your character sh ...

  6. Start Failed, Internal error: recovering IDE to the working state after the critical startup error

    Start Failed, Internal error: recovering IDE to the working state after the critical startup error F ...

  7. UVA1674 闪电的能量 树剖

    UVA1674 闪电的能量 树剖 题面 水.树剖模板 #include <cstdio> #include <cstring> #include <algorithm&g ...

  8. MySQL数据分析(16)— 数据操作之增删改查

    前面我们说学习MySQL要从三个层面,四大逻辑来学,三个层面就是库层面,表层面和数据层面对吧,数据库里放数据表,表里放数据是吧,大家可以回忆PPT中jacky的这图,我们已经学完了库层面和表层面,从本 ...

  9. 一步一步配置AWS ELB Https证书

    第一步:生成CSR 要配置证书,我们首先需要创建一个CSR来向证书提供商申请证书.这个过程我们可以通过IIS中的工具来生成. 然后需要填写如下信息: 下一步后选择文件名后我们就可以创建出CSR 文件了 ...

  10. EGL Driver message (Critical) eglInitialize: No available renderers.

    使用Python的selenium库进行自动化巡检.并将相对应的数据保存 环境: Windows Embedded Standard Python 2.7.16 selenium 3.141.0 [0 ...