error:attempted to return null from a method with a primitive return type (int)
1,起因
今天老大让改bug,说有个模块数据提交不了,让我看看。。。检查服务器发现这个报错。。attempted to return null from a method with a primitive return type (int)
2,报错原因
mybatis中resultType返回数据为int类型,而因为没有查询结果返回为null,int初始化为0,不能为空,所以报了这个错误。...
原创
2019-06-20 20:26:29 ·
10313 阅读 ·
1 评论