【errors】Mapper method attempted to return null from a method with a primitive return type (int).

問題

嚴重: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Mapper method 'com.cxx.mapper.MessageMapper.updateStatus attempted to return null from a method with a primitive return type (int).] with root cause
org.apache.ibatis.binding.BindingException: Mapper method 'com.cxx.mapper.MessageMapper.updateStatus attempted to return null from a method with a primitive return type (int).
... ...

xml 如下:

<!--標記消息已讀-->
<select id="updateStatus" parameterType="int">
    update message set status = #{param2} where id = #{param1}
</select>

sql 語句,無誤,update 語句返回被更新的行數,無誤

解決

我坑我自己
update 語句用什麼 seelct 標籤!!!!!!!!!!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章