数据库,报错:Error setting null for parameter #1with JdbcType OTHER.Try setting a different JdbcType for

报错内容:
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: 无效的列类型

报错原因:1.参数传的不对(参数名对不上);
2.参数类型不匹配;
解决办法:1.仔细检查xml中的参数名和传递的参数名
2.在xml中,参数后面加jdbcType=VARCHAR eg:#{id,jdbcType=VARCHAR}

猜你喜欢

转载自blog.csdn.net/zcaixx/article/details/83349795