码迷,mamicode.com
首页 > 移动开发 > 详细

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping...

时间:2019-03-01 09:44:34      阅读:680      评论:0      收藏:0      [点我收藏+]

标签:pen   iba   ted   数据库   apache   name   system   type   spring   

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property=‘createTime‘, mode=IN, javaType=class java.util.Date, jdbcType=null, numericScale=null, resultMapId=‘null‘, jdbcTypeName=‘null‘, expression=‘null‘}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #4 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Date","status":500

是因为设计数据库的时候主键忘记加了,而又使用的是MyBatis 通用 Mapper里的方法,找不到主键导致的

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping...

标签:pen   iba   ted   数据库   apache   name   system   type   spring   

原文地址:https://www.cnblogs.com/SeaWxx/p/10454532.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!