报错原因:

出现这种错误,说明sql语句执行成功,只是返回类型出了问题

解决方法:

insert、delete、update操作默认返回一个int类型的整数,将增删改的接口改成int或者void即可。

select操作返回的类型可以是自定义的Map或者是List(目前遇到的),这里等我总结了resultType相关知识再回来补充!

没有解决前: insert返回值用的是Dept类,但实际上需要传2个参数,而Dept则是三个参其中一个是自增主键,因此返回的不全就会报错。  改成Void就解决了;

Mybatis 报错Mapper method 'xxx' has an unsupported return type的更多相关文章

  1. dao 接口定义了一个方法,报错 The method xxx is undefined for the type xxx;

    转自:https://blog.csdn.net/panshoujia/article/details/78203837 持久层(DAO层)下的一个接口 ,eclipse报了一个The method ...

  2. notification 报错the method build() is undefined for the type Notificatin.Builder

    notification 报错the method build() is undefined for the type Notificatin.Builder 这事api版本号太低导致的 Notifi ...

  3. Eclipse 报错The method xxx of type must override a superclass method、Description Resource Path Location Type Java compiler level does not match the version of the installed Java project facet

    问题: 如上图, 没改钱@Override会报错The method run() of type must override a superclass method 原因: java1.5中继承接口是 ...

  4. 【踩坑】报错 non-static method xxx() cannot be referenced from a static context

    今天测试代码时遇到 Error:(6, 55) java: non-static method sayGoodbye() cannot be referenced from a static cont ...

  5. spring boot+mybatis报错mapper无法注入

    搭建spring boot项目时启动出现的问题,先来看异常片段: Error starting ApplicationContext. To display the conditions report ...

  6. mybatis报错:Invalid bound statement (not found)

    mybatis报错:Invalid bound statement (not found)的原因很多,但是正如报错提示一样,找不到xml中的sql语句,报错的情况分为三种: 第一种:语法错误 Java ...

  7. Springboot项目下mybatis报错:Invalid bound statement (not found)

    mybatis报错:Invalid bound statement (not found)的原因很多,但是正如报错提示一样,找不到xml中的sql语句,报错的情况分为三种: 第一种:语法错误 Java ...

  8. mybatis报错:A query was run and no Result Maps were found for the Mapped Statement、、Property [login_ip] not found on type [com.thinkgem.jeesite.common.permission.entity.PremissUser]问题解决

    今天在做ssm项目的时候出现了: 先是出现 了错误: mybatis报错:A query was run and no Result Maps were found for the Mapped St ...

  9. Mybatis 报错

    Mybatis 报错 builder.BuilderException: Error parsing SQL Mapper Configuration Caused by: org.apache.ib ...

随机推荐

  1. Excel 运算符(三):文本连接符

    文本连接符&用来合并文本串.比如,连接"计算机"和"基础"两个文本串:"计算机基础"&"基础",最终结果 ...

  2. 前端架构-分层而治,铁打的MV流水的C

    大家好,我是Eluxjs的作者,Eluxjs是一套基于"微模块"和"模型驱动"的跨平台.跨框架『同构方案』,欢迎了解... 文前声明,以下推断和结论纯属个人探索 ...

  3. 算法模板:C++的高精度

    代码是抄别人的:https://blog.csdn.net/code4101/article/details/38705155. 这篇博客只是用来查看保存,非原创. #include<iostr ...

  4. PHP实现获取本地视频进行随机播放

    创建一个文件夹,里面随便方视频文件即可 列如文件夹名字是assets代码如下 <? $handler = opendir('./assets/mp4/');//当前目录中的文件夹下的文件夹 需要 ...

  5. C#使用BouncyCastle生成PKCS#12数字证书

    背景 生成数字证书用于PDF文档数字签名 数字证书需要考虑环境兼容性,如linux.windows 网上资料不全或版本多样 本文章主要介绍了在C#中使用BouncyCastle生成PKCS#12个人信 ...

  6. sql报错收集

    踩坑记录: 当出现如下错误 Not enough parameters for the SQL statement 多半是因为插入时填写的字段名有误 json.decoder.JSONDecodeEr ...

  7. KingbaseES V8R6集群维护案例之---停用集群node_export进程

    案例说明: 在KingbaseES V8R6集群启动时,会启动node_exporter进程,此进程主要用于向kmonitor监控服务输出节点状态信息.在系统安全漏洞扫描中,提示出现以下安全漏洞: 对 ...

  8. KingbaseES 缺少库文件问题

    在工作中大家经常会遇到找不到某个so 的问题,这类可能是so文件缺失,或者是由于LD_LIBRARY_PATH 环境变量设置不当的原因. 1.库文件 我们通常把一些公用函数制作成函数库,供其它程序使用 ...

  9. Python数据科学手册-前言

    读Python数据科学手册 笔记 系列 数据科学 data science https://img2022.cnblogs.com/blog/2827305/202205/2827305-202205 ...

  10. 互联网公司员工职级、研发效能度量、OKR与绩效考核

    今天要写这篇文章,来自最近有两个点触动了我.第一个触动点是奈飞(netflix)做出了一个巨大动作<"不搞职级.人人平等" 25 年后行不通了?Netflix 破天荒引入细分 ...