Mybatis报错解决

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无法进行转换,

posted @ 2018-01-15 17:44  ziyou435  阅读(2937)  评论(0编辑  收藏  举报