报错-->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. 【Cocos2d-x 3.X 资源及脚本解密】

    加密就不用说了,看上一篇2.X加密的方式,怎么弄都可以.的保证解密规则就行: 现在重点说3.X解密: 在新的3.X引擎中官方整合了大部分获取资源的方法,最终合成一个getdata: 可以从源码,和堆栈 ...

  2. RedRabbit——基于BrokerPattern服务器框架

    RedRabbit 经典网游服务器架构 该图省略了专门用途的dbserver.guildserver等用于专门功能的server,该架构的优点有: l LoginGate相当于DNS,可以动态的保证G ...

  3. golang append

    1) Append a slice b to an existing slice a: a = append(a, b...) 2) Copy a slice a to a new slice b: ...

  4. Oracle数据库入门——pctfree和pctused详解

    一.建立表时候,注意PCTFREE参数的作用 PCTFREE:为一个块保留的空间百分比,表示数据块在什么情况下可以被insert,默认是10,表示当数据块的可用空间低于10%后,就不可以被insert ...

  5. Windows Server 2008 Workstation Converter优化设置

    http://www.win2008workstation.com/windows-server-2008-workstation-converter/ If you don’t want to co ...

  6. WEB安全入门(转)

    一. 首先你得了解Web Web分为好几层,一图胜千言:事实是这样的:如果你不了解这些研究对象是不可能搞好安全研究的.这样看来,Web有八层(如果把浏览器也算进去,就九层啦,九阳神功……)!!!每层都 ...

  7. mybatis配置文件(其中,注意节点先后顺序)

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC & ...

  8. ruby 除法运算

    在Ruby中根据运算对象的值的不同进行不同的操作.除法运算符"/"的两边同为Interger对象时运算符进行整除运算,其中任意一方为Float对象时进行实数的除法运算. 7 / 2 ...

  9. Asphyre 更名pxl 终于全面支持跨平台了.Delphi饭们 激动了吧.

    Asphyre We are happy to announce the official release of our latest framework Pascal eXtended Librar ...

  10. 爬虫技术 -- 进阶学习(七)简单爬虫抓取示例(附c#代码)

    这是我的第一个爬虫代码...算是一份测试版的代码.大牛大神别喷... 通过给定一个初始的地址startPiont然后对网页进行捕捉,然后通过正则表达式对网址进行匹配. List<string&g ...