关于运行期异常 :MyBatis异常Parameter 'title' not found
来源:互联网 发布:禁止软件打开浏览器 编辑:程序博客网 时间:2024/04/29 14:59
1、异常背景:
$.post()传递两个参数到action后台,其中,这两个参数是一个entity的两个属性,将参数传递到mapper.xml文件中引用时报错。
2、异常原因:
mapper.java接口中,将两个参数分别传入,计算机无法识别他们。
3、解决方法:
mapper.java接口中,或者在service实现方法中,将两个参数封装到entity类中,再传递到mapper.xml文件中进行引用。
Mapper.xml文件:
- <insert id="insert1" parameterType="model.Blog" useGeneratedKeys="true" keyProperty="id">
- insert into Blog (title, content) values (#{title}, #{content})
- </insert>
Mapper类:
- int insert2(String title, String content);
转载自:http://1358440610-qq-com.iteye.com/blog/1827391
0 0
- 关于运行期异常 :MyBatis异常Parameter 'title' not found
- Mybatis异常 Parameter "..." not found
- 关于一些mybatis异常的原因:org.apache.ibatis.binding.BindingException: Parameter 'status' not found.
- mybatis异常:org.apache.ibatis.binding.BindingException: Parameter 'param' not found. Available param
- mybatis异常:org.apache.ibatis.binding.BindingException: Parameter 'param' not found. Available param
- mybatis 批量增加 报异常 Parameter '__frch_item_0' not found. Available parameters are [list]
- Mybatis foreach异常Parameter '__frch_item_0' not found. Available parameters are [list]
- mybatis 异常:Invalid bound statement (not found) .
- Mybatis异常:Invalid bound statement (not found)
- mybatis 异常 Invalid bound statement (not found)
- 61.mybatic insert异常:BindingException: Parameter 'name' not found
- 61.mybatic insert异常:BindingException: Parameter 'name' not found
- Mybatis出现Parameter not found
- mybatis问题org.apache.ibatis.binding.BindingException: Parameter 'title' not found.
- mybatis问题org.apache.ibatis.binding.BindingException: Parameter 'title' not found.
- mybatis 异常处理:Invalid bound statement (not found)
- springboot 集成mybatis Invalid bound statement (not found)异常
- mybatis 异常处理:Invalid bound statement (not found)
- ShareSDK
- [Leetcode] 226. Invert Binary Tree
- maven项目转gradle项目
- 【bzoj4516】[Sdoi2016]生成魔咒 后缀自动机
- WPF制作只有部分圆角的矩形
- 关于运行期异常 :MyBatis异常Parameter 'title' not found
- 基于Hadoop生态圈的数据仓库实践 —— 环境搭建(三)
- 如何与领导相处
- 如何快速将Swift2.0的项目过渡到Swift3.0
- Swift - 多线程实现方式
- 【Excel】复制的时候,只选择筛选的部分,不选择隐藏的部分
- matlab 描点画图
- Letter Combinations of a Phone Number
- git常见问题解决办法