org.apache.ibatis.type.TypeException: Error setting null for parameter #8 with JdbcType OTHER . Try

向数据库添加值为null时 报错------- 
报错信息:org.apache.ibatis.type.TypeException: Error setting null for parameter #8 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: 无效的列类型: 1111

 

我的解决方法:在mybatis-config.xml中插入  <setting name="jdbcTypeForNull" value="NULL"/>就解决了

如图:
org.apache.ibatis.type.TypeException: Error setting null for parameter #8 with JdbcType OTHER . Try