Mybatis 报错Mapper method 'xxx' has an unsupported return type
报错原因:
出现这种错误,说明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的更多相关文章
- dao 接口定义了一个方法,报错 The method xxx is undefined for the type xxx;
转自:https://blog.csdn.net/panshoujia/article/details/78203837 持久层(DAO层)下的一个接口 ,eclipse报了一个The method ...
- notification 报错the method build() is undefined for the type Notificatin.Builder
notification 报错the method build() is undefined for the type Notificatin.Builder 这事api版本号太低导致的 Notifi ...
- 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中继承接口是 ...
- 【踩坑】报错 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 ...
- spring boot+mybatis报错mapper无法注入
搭建spring boot项目时启动出现的问题,先来看异常片段: Error starting ApplicationContext. To display the conditions report ...
- mybatis报错:Invalid bound statement (not found)
mybatis报错:Invalid bound statement (not found)的原因很多,但是正如报错提示一样,找不到xml中的sql语句,报错的情况分为三种: 第一种:语法错误 Java ...
- Springboot项目下mybatis报错:Invalid bound statement (not found)
mybatis报错:Invalid bound statement (not found)的原因很多,但是正如报错提示一样,找不到xml中的sql语句,报错的情况分为三种: 第一种:语法错误 Java ...
- 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 ...
- Mybatis 报错
Mybatis 报错 builder.BuilderException: Error parsing SQL Mapper Configuration Caused by: org.apache.ib ...
随机推荐
- 使用MindSpore计算旋转矩阵
技术背景 坐标变换.旋转矩阵,是在线性空间常用的操作,在分子动力学模拟领域有非常广泛的应用.比如在一个体系中切换坐标,或者对整体分子进行旋转平移等.如果直接使用Numpy,是很容易可以实现的,只要把相 ...
- x64dbg 插件开发环境配置
x64dbg 是一款开源的应用层反汇编调试器,旨在对没有源代码的可执行文件进行恶意软件分析和逆向工程,同时 x64dbg 还允许用户开发插件来扩展功能,插件开发环境的配置非常简单,如下将简单介绍x64 ...
- KingbaseES 数据库Windows环境下注册失败分析
关键字: KingbaseES.Java.Register.服务注册 一.安装前准备 1.1 软件环境要求 金仓数据库管理系统KingbaseES V8.0支持微软Windows 7.Windows ...
- alter role 导致的数据库无法登录问题
ALTER ROLE 用于更改一个数据库角色.只要改角色后续开始一个新会话,指定的值将会成为该会话的默认值,并且会覆盖 kingbase.conf中存在的值或者从命令行收到的值. 显性的更改角色的一 ...
- .NET 反向代理-YARP
什么是 YARP YARP (另一个反向代理) 设计为一个库,提供核心代理功能,你可以根据应用程序的特定需求进行自定义. YARP 是使用 .NET的基础架构构建在 .NET上的.YARP 的主要不同 ...
- 亚马逊云科技现身世界人工智能大会,揭示AI最新技术趋势
2022世界人工智能大会(WAIC)于日前落幕.经过过去四届的发展与沉淀,今天的世界人工智能大会已成为人工智能领域最有影响力的国际盛会之一,今年大咖云集.国际大厂扎堆,充分彰显了大会的国际影响力和磁力 ...
- 使用Prometheus和Grafana监控RabbitMQ集群 (使用RabbitMQ自带插件)
配置RabbitMQ集群 官方文档:https://www.rabbitmq.com/prometheus.html#quick-start 官方github地址:https://github.com ...
- Elasticsearch Top10 监控指标
文章转载自: https://mp.weixin.qq.com/s?__biz=MzI2NDY1MTA3OQ==&mid=2247484441&idx=1&sn=8292f50 ...
- Elasticsearch 趋势科技实战分享笔记
文章转载自: https://mp.weixin.qq.com/s?__biz=MzI2NDY1MTA3OQ==&mid=2247484113&idx=1&sn=6c40d7f ...
- Elasticsearch官方文档离线访问实操指南
文章转载自:https://mp.weixin.qq.com/s/Cn9ddkj-cne5pKtfOgNPbg 延申一下,不仅能下载Elasticsearch官方文档,还能下载其他软件的官方文档,详看 ...