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