关于spring-mvc:MybatisMapper-method-attempted-to-return-null-from-a-method

关键词

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)

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理