mybatis使用xml实现发生的异常之一return null from a method with a primitive return type (int)

 

 

 

主要原因:

1、接口的返回值错误

2、接口的xml错误  ( 主要是标签写错了)

 

在这里我的接口:

 

 发现这句并没有错误,那我再看接口的xml:

 

 

很明显的就发现了select这里错误,insert,update,delect这些返回值为int类型,是不用写返回值的;

这里是标签写错了:

修改后的代码:

 

 把resultType去掉:

 

本文作者:AxeBurner

本文链接:https://www.cnblogs.com/bichen-01/p/11730252.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   AxeBurner  阅读(1038)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
💬
评论
📌
收藏
💗
关注
👍
推荐
🚀
回顶
收起
  1. 1 404 not found REOL
404 not found - REOL
00:00 / 00:00
An audio error has occurred.