出错写法: ps.setInteger(1, obj.get("id")); 修改写法:(解决报错问题) ps.setNull(1, Types.INTEGER);ps.setInteger(1, obj.get("id"));