当前使用版本(必填,否则不予处理)

2.0.0

该问题是如何引起的?(确定最新版也有问题再提!!!)

mapper.insert(T)

重现步骤(如果有就写完整)

MdmPhaseC4Info mdmPhaseC4Info = new MdmPhaseC4Info(); mdmPhaseC4Info.setId("213821389"); mdmPhaseC4Info.setAddress("西湖"); mdmPhaseC4Info.setBudgetflag("1"); mdmPhaseC4Info.setCompanyid("123823782232"); try { int insert = mdmPhaseC4InfoMapper.insert(mdmPhaseC4Info); System.out.println(insert); } catch (Exception e) { e.printStackTrace(); }

报错信息

nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='companycode', 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 #3 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: 无效的列类型: 1111

Comment From: chen-zhaoyi

mybatis: configuration: jdbc-type-for-null: 'null' 添加这个并没有起到作用

Comment From: miemieYaho

mybatis-plus: configuration: jdbc-type-for-null: 'null'