Cause: java.sql.SQLException: 无效的列类型: 1111 ; uncategorized SQLException for SQL []; SQL state [99999]; error code [17004]; 无效的列类型: 1111; nested exception is java.sql.SQLException: 无效的列类型: 1111
查了下说mybatis插入空值时需要指定jdbcType,但我指定了啊!!!
<insert id="addAddress" parameterType="Address"> insert into shop_address<!-- 插入空值需指定jdbcType--> values(#{id},#{userId},#{accept},#{zip,jdbcType=VARCHAR},#{phoneNum,jdbcType<span style="white-space:pre"> </span>=VARCHAR},#{mobile,jdbcType=VARCHAR},#{province},#{city},#{area},#{address},<span style="white-space:pre"> </span>#{isDefault}) </insert>找了半天终于发现错在哪了,有个单词打错了!!!
<span style="white-space:pre"> </span>
<span style="white-space:pre"> </span>public String getAccept() { return accept; }
<span style="white-space:pre"> </span>
//setAccept public void setAccpet(String accept) { this.accept = accept; }我太粗(dou)心(bi)了!!!下次还是自动生成吧。