报错信息:Error setting null for parameter #6 with JdbcType OTHER...

 
环境:
oracle数据库
 
报错内容:
### Cause: org.apache.ibatis.type.TypeException: Error setting null for parameter #10 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: 无效的列类型
 
MyBatis 插入空值时,需要指定JdbcType,因为mybatis无法进行转换
 
解决方法:
 
在insert语句中,增加jdbcType
例如:
#{name,jdbcType=VARCHAR}   
posted @ 2022-01-07 08:43  IIIID  阅读(549)  评论(0编辑  收藏  举报