Mybatis:Mapper method attempted to return null from a method with a primitive return type (int)


關鍵詞

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)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM