报错-->Parameter 'name' not found. Available parameters are [1, 0, param1, param2]

  百度找到这篇文章完成修改 http://blog.csdn.net/w86440044/article/details/29363067

  我之前写的操作类是和博主一样,是这样的:

     // 登录·查询
@Select("select * from t_users where uname=#{name} and pswd=#{pswd}")
public Users findByNP(String name, String pswd);

  结果测试时弹出上面报错,按博主方法修改后:

     // 登录·查询
@Select("select * from t_users where uname=#{0} and pswd=#{1}")
public Users findByNP(String name, String pswd);

  运行测试程序就正常了

  结果:那个地方不可以用名称匹配,还有其它原因吗?

初学Java9:学习Mybatis时报错:Parameter 'name' not found. Available parameters are [1, 0, param1, param2]的更多相关文章

  1. IDEA下运行 mybatis报错 Parameter 'arg0' not found. Available parameters are [autoRecharge, id, param1, param2]

    电脑换系统之后重新安装一了 一下idea 项目运行时出现了以下错误, [autoRecharge, id, param1, param2] 或 [arg0, id, arg1, param2] 参考地 ...

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

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

  4. Parameter 'username' not found. Available parameters are [1, 0, param1, param2]

    只要把dao层的***Mapper.java代码的参数加上@param 才可以 修改前的代码 public User selectLogin(String username,String passwo ...

  5. Parameter 'id' not found. Available parameters are [1, 0, param1, param2]异常

    出现此类异常可能的原因:Mapper.xml文件中的parameterType的类型与传入的参数类型不匹配

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

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

  8. 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": ...

  9. MyBatisSystemException->BindingException: Parameter 'xxx' not found. Available parameters are [arg1, arg0, param1, param2]

    最近在使用Spring boot+mybatis做新的基础框架,结果碰到如下问题: 1 org.mybatis.spring.MyBatisSystemException: nested except ...

随机推荐

  1. C#使用ICSharpCode.SharpZipLib.dll压缩文件夹和文件

    大家可以到http://www.icsharpcode.net/opensource/sharpziplib/ 下载SharpZiplib的最新版本,本文使用的版本为0.86.0.518,支持Zip, ...

  2. jquery-migrate.js

    这个插件可以用来检测和恢复在jQuery1.9版本中已删除或已过时的API.

  3. hadoop 转

    detailed http://wenku.baidu.com/view/c2d1ebb4ba0d4a7302763a84.html http://hadoop.apache.org/docs/r1. ...

  4. Java分布式应用技术架构介绍

    分布式架构的演进 系统架构演化历程-初始阶段架构

  5. Guardian of Decency(二分图)

    Guardian of Decency Time Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %llu Submi ...

  6. hessian入门

    hessian简介 Hessian是二进制的web service协议,官方网站提供Java.Flash/Flex.Python.C++..NET C#等实现.Hessian和Axis.XFire都能 ...

  7. SplayTree伸展树的非递归实现(自底向上)

    Splay Tree 是二叉查找树的一种,它与平衡二叉树.红黑树不同的是,Splay Tree从不强制地保持自身的平衡,每当查找到某个节点n的时候,在返回节点n的同时,Splay Tree会将节点n旋 ...

  8. I'm back for Machine Learning

    Hi, Long time no see. Briefly, I plan to step into this new area, data analysis. In the past few yea ...

  9. 设计前沿:25款精妙的 iOS 应用程序图标

    在这篇文章中,我为大家精心挑选的25款巧妙设计的 iOS 应用程序图标,会激发你未来的工作.苹果的产品总是让人爱不释手,设计精美,对用户使用体验把握得淋漓尽致,iPhone.iPad.iPod和 iM ...

  10. js获取html5 audio 音频时长方法

    <audio src="我的好兄弟.mp3" controls="controls"  id="audio" style=" ...