- 網頁出現 406 錯誤
- 原因及解決方法
- 查看是否存在Jackson包
- 請求頁面的後綴不能是 .html
- 解決post亂碼問題
@RequestMapping(value = "/httpclient/post", method = RequestMethod.POST, produces = MediaType.TEXT_PLAIN_VALUE + ";charset=utf-8")
<insert id="insert" parameterType="com.taotao.pojo.TbContentCategory" >
<selectKey keyProperty="id" resultType="long" order="AFTER">
SELECT LAST_INSERT_ID()
</selectKey>>
insert into tb_content_category (id, parent_id, name,
status, sort_order, is_parent,
created, updated)
values (#{id,jdbcType=BIGINT}, #{parentId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{sortOrder,jdbcType=INTEGER}, #{isParent,jdbcType=BIT},
#{created,jdbcType=TIMESTAMP}, #{updated,jdbcType=TIMESTAMP})
</insert>
- update 返回值問題
- 使用原生的sql(或者mysql)重複請求update操作的時候,執行兩次,update返回影響行數爲 0
- 第三方持久化框架返回來的是被匹配的影響行數,所以返回的始終是1(mybatis)