idea报错:Parameter ‘userName‘ not found. Available parameters are [userinfo, param1]] with root cause
在我们运行idea时,会有这种错误,这种是参数上传错误造成的,
解决办法有三种:
1.加注解
Userinfo getUserByName(@Param("userName") String userName, @Param("pwd") String pwd);
类似于中加@Param()注解。
2.在 mapper.xml文件里,加下标
<insert id="insert" parameterType="com.example.pojo.SmbmsYonghu">insert into smbms_yonghu (id, contact, addressDesc, postCode, tel, createdBy, creationDate, modifyBy, modifyDate, userId)values (#{0,jdbcType=BIGINT}, #{1,jdbcType=VARCHAR}, #{2,jdbcType=VARCHAR}, #{3,jdbcType=VARCHAR}, #{4,jdbcType=VARCHAR}, #{5,jdbcType=BIGINT}, #{6,jdbcType=TIMESTAMP}, #{7,jdbcType=BIGINT}, #{8,jdbcType=TIMESTAMP}, #{9,jdbcType=BIGINT})</insert>
3.如果以上两种方法还是不行 ,就可以看看你的dao层 是不是这种写法:
int updata(@Param("userinfo")Userinfo userinfo);//这是错误的写法
因为@Param()不能加在一个类上,
应该改为
int updata(Userinfo userinfo);
这样才可以
idea报错:Parameter ‘userName‘ not found. Available parameters are [userinfo, param1]] with root cause相关推荐
- Mybatis 报错`Parameter '0' not found. Available parameters are [arg1, arg0, param1, param2]`
1.异常信息: Parameter '0' not found. Available parameters are [arg1, arg0, param1, param2] 这是因为mybatis的M ...
- idea运行报错Parameter ‘name‘ not found. Available parameters are [arg1, arg0, param1, param2]
Parameter 'name' not found. Available parameters are [arg1, arg0, param1, param2] 出现问题: 在mapper或者dao ...
- 解决报错Parameter 0 of constructor in XXX required a bean...elasticsearch 继承ElasticsearchConfiguration方法
SpringBoot中构建带有含参构造函数的Bean,解决报错Parameter 0 of constructor in XXX required a bean ,elasticsearch继承Abs ...
- 批量插入报错:Parameter ‘id‘ not found. Available parameters are [forlonList, param1]
项目场景: 在开发中,需要通过批量插入,生成主键id,然后进行数据关联操作 问题描述 Caused by: org.apache.ibatis.executor.ExecutorException: ...
- org.apache.ibatis.binding.BindingException: Parameter 'username' not found. Available parameters
错误信息: ### Error updating database. Cause: org.apache.ibatis.binding.BindingException: Parameter 'use ...
- Parameter ‘username‘ not found. Available parameters are [arg1, arg0, param1, param2] 绑定参数异常
出现绑定异常 绑定参数username找不到,这是一个知识点的补漏,这篇文章相信对你肯定有所帮助! org.apache.ibatis.binding.BindingException: Parame ...
- sq语句报错Parameter index out of range (2 > number of parameters, which is 1).
sql语句报错: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeE ...
- Git报错 Incorrect username or password (access token) 的解决方式
错误原因 在使用git的时候 出现 Incorrect username or password (access token),这个报错主要就是代表本地保存的gitee或者GitHub的账号还有密码错 ...
- springboot启动报错Parameter 0 of method a in com.* required a bean of type 'java.lang.String' that could
springboot服务启动报错,报错信息如下 *************************** APPLICATION FAILED TO START ******************** ...
最新文章
- security NO.2
- python string模块template_Template Strings
- javascript随堂练习(分支,循环语句)
- Ubuntu配置静态IP
- 美军开发远程人脸识别系统,实现1公里内目标识别
- js中的new file_JS中的new操作符
- java.lang.IllegalStateException: No modifications are allowed to a locked ParameterMap问题的解决
- python是什么 自学-这是大多数新手入门之后强烈推荐的python自学入门指南秘笈...
- 开发服务器 安装 centos 8 无法进入图形安装界面 X startup failed falling back to text mode
- 查看dll库导出库的函数接口
- 安卓WebView调起本地文件选择
- 《百家讲坛》之战国七雄
- 汇编语言--微机CPU的指令系统(五)(循环指令)
- CheckBox和ListView的结合使用
- OSIRISV4.1使用教程(最新可用版)
- microapp微前端基础使用
- 安卓中自定义view控件代替radiogroup实现颜色渐变效果的写法
- 【日常】计算机操作系统入门
- 【mysql】gh-ost使用说明
- 自然数幂和 伯努利数
热门文章
- QQ/微信里被禁止访问的网页怎么处理 如何检测域名是否被微信封
- activiti监听器设置审批人
- ERP系统-应收分析客户账龄
- 如何编写智能合约之三:使用OpenZepplin函数库开发智能合约
- 学生学完python靠几个接单网站兼职,实现经济独立
- [045] 微信公众平台开发教程第21篇-“可信网址”白名单
- 高频宽带功率放大器(频率:10KHZ-500KHZ 功率:400W-800W)
- 分布式profinet网络总线模块分线盒
- 树莓派基础之文件系统认知
- tar.gz文件怎么解压缩_如何解压缩tar.gz文件