mybatis 返回主键出错 P…
来源:互联网 发布:如何下载喀秋莎软件 编辑:程序博客网 时间:2024/06/06 09:18
1.错误信息
三月 06, 2017 5:04:34 下午org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [springMvc] in context withpath [/lst_platform] threw exception [Request processing failed;nested exception is org.mybatis.spring.MyBatisSystemException:nested exception is org.apache.ibatis.executor.ExecutorException:Error getting generated key or setting result to parameter object.Cause: org.apache.ibatis.binding.BindingException: Parameter 'ID'not found. Available parameters are [EquipmentManagement, param1]]with root cause
org.apache.ibatis.binding.BindingException: Parameter 'ID' notfound. Available parameters are [EquipmentManagement, param1]
atorg.apache.ibatis.binding.MapperMethod$ParamMap.get(MapperMethod.
atorg.apache.ibatis.reflection.wrapper.MapWrapper.getSetterType(MapWrapper.
atorg.apache.ibatis.reflection.MetaObject.getSetterType(MetaObject.
2.解决办法
修改前:
修改后:
由于插入操作参数类型是一个对象,但是返回主键是一个值,就会造成参数类型不匹配。
修改后利用对象调用其属性。最终传入的参数类型还是一个对象。
阅读全文
0 0
- mybatis 返回主键出错 P…
- Hibernate 保存返回主键
- 【css3】transform 下 p…
- Warning[w2]: Symbol ?P…
- 【原创】 linux-mysql p…
- airprobe: gsm-tvoid : gsm_scan.p…
- 【教程】V P N 的…
- 【教程】V P N 的…
- Beginning Storyboards in iOS 5 P…
- [转]int* p[2] 与 int (*p)[2]…
- [转]int* p[2] 与 int (*p)[2]…
- windows 下搭建apache php mysql p…
- centOS 5.2 下搭建基于p…
- 【720p】2013 怪兽大学 …
- 【720p】2013 怪兽大学 …
- 【720p】2013 怪兽大学 …
- 【720p】2013 怪兽大学 …
- 【720p】2013 怪兽大学 …
- easyui在某一行合并列
- 关于win2008+iis下php程序无法写入…
- 不能比较或排序 text、ntext&…
- 随机数
- win7+IIS+PHP配置
- mybatis 返回主键出错 P…
- Spring源码解析之注解的扫描
- mybatis 批量插入数据mysql和…
- a标签中UUID作为参数传入onclick函…
- 配置spring mvc请求的几种方式
- easyui加载数据两次请求后台的问题…
- shirofilter权限配置说明
- MySQL数据库死锁的解决办法
- 在IntellJIDEA上部署TOMCAT服务器