關鍵詞
SpringMVC SSM Mybatis eclipse
報錯內容
Mybatis:Mapper method attempted to return null from a method with a primitive return type (int)
原因
Mapper.xml的標簽用錯了。。。(低級錯誤,輕噴。。。)
比如本來應該:
插入語句用<insert></insert>,更新語句用<update></update>,刪除語句用<delete></delete>
結果全用成<select></select>
解決
用回對應的標簽就行。
參考
Mybatis:Mapper method attempted to return null from a method with a primitive return type (int)
