Caused by: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='jobStatus', 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 null for parameter #5 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: 无效的列类型: 1111
报这个错误是因为insert时候jobStatus这个字段java类型是string对应的jdbcType为varchar,但是在xml中没有指定具体的类型所以报错了。
insert table_name(jobStatus)values(#{jobStatus})改成如下就解决错误了
insert table_name(jobStatus)values(#{jobStatus,jdbcType=VARCHAR})