首页 > 其他 > 详细

Mybatis报错解决

时间:2018-01-15 18:14:57      阅读:297      评论:0      收藏:0      [点我收藏+]
Caused by: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property=‘input‘, mode=IN, javaType=class java.lang.String, jdbcType=null, numericScale=null, resultMapId=‘null‘, jdbcTypeName=‘null‘, expression=‘null‘}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #1 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.sql.SQLException: No operations allowed after statement closed.

解决:mybatis SQL语句指定数据类型,比如:#{lala,jdbcType=VARCHAR}

原因:MyBatis 插入空值时,需要指定JdbcType 
mybatis insert,update空值报空值异常,但是在pl/sql不会提示错误,主要原因是mybatis无法进行转换,

Mybatis报错解决

原文:https://www.cnblogs.com/zhangdi666/p/8289123.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!