mybatis使用map传递多参数报错:A query was run and no Result Maps were found for the Mapped Statement
在使用mybatis进行多参数传递时,报错:
A query was run and no Result Maps were found for the Mapped Statement 'xx.xx.'. It's likely that neither a Result Type nor a Result Map was specified.
后来发现,原来是没有指定resultMap或resultType
mybatis中的所有查询,都必须返回resultType或者resultMap的值,否则就会报如上错误的。
到此,问题就解决了。
可是我又好奇了,resultMap怎么使用呢?
这就涉及到多表联查
请看下文!
....................
----------------------------------------------------------------------------
大家好,我是ABKing
金麟岂是池中物,一遇风云便化龙!
欢迎与我交流技术问题
mybatis使用map传递多参数报错:A query was run and no Result Maps were found for the Mapped Statement的更多相关文章
- 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报错:A query was run and no Result Maps were found for the Mapped Statement
转自:https://blog.csdn.net/u013399093/article/details/53087469 今天编辑mybatis的xml文件,出现如下错误: 程序出现异常[A quer ...
- A query was run and no Result Maps were found for the Mapped Statement 'user.insertUser!selectKey'. It's likely that neither a Result Type nor a Result Map was specified.
使用mybatis时出现异常问题: 有如下的错误 Error querying database. Cause: org.apache.ibatis.executor.ExecutorExceptio ...
- ExecutorException: A query was run and no Result Maps were found for the Mapped Statement ‘com.win.mall.dao.CartMapper.test’. It’s likely that neither a Result Type nor a Result Map was specified.
ExecutorException: A query was run and no Result Maps were found for the Mapped Statement 'com.win.m ...
- mybatis配置文件xxxx.xml中缺失返回类型的后果A query was run and no Result Maps were found
使用mybatis时出现异常问题: 有如下的错误 Error querying database. Cause: org.apache.ibatis.executor.ExecutorExcepti ...
- A query was run and no Result Maps were found for...原来是mapper.xml文件出了问题,是使用MyBatis最常见的一种错误
今天遇到一个问题,原来是mapper.xml文件出了问题,是使用MyBatis最常见的一种错误 报错的结果是这样的: A query was run and no Result Maps were f ...
- 单元测试时候使用[ClassInitialize]会该方法必须是静态的公共方法,不返回值并且应采用一个TestContext类型的参数报错的解决办法
using Microsoft.VisualStudio.TestTools.UnitTesting; 如果该DLL应用的是 C:\Program Files\Microsoft Visual Stu ...
- 【spring mvc】后台spring mvc接收List参数报错如下:org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.util.List]: Specified class is an interface
后台spring mvc接收List参数报错如下:org.springframework.beans.BeanInstantiationException: Failed to instantiate ...
- mybatis 中文做参数报错
一个简单的查询,如果参数中有中文.如下: <select id="xxxx" resultType="hashmap"> select * from ...
随机推荐
- web性能优化--减少DOM操作(三)
减少DOM数量 减少DOM操作 批量处理DOM操作 批量处理样式修改 尽量不要使用tabel布局 尽量不要使用css表达式 string用数组join css选择符优化 1.减少DOM数量 在HTML ...
- Proxy Class(代理类)
在使用二维数组时,我们可以使用a[][]来访问数组中的元素,这很显然是正确的也无需证明. 但如果要自己实现一个二维数组的时候,会发现如果想要重载符号[][],会被告知没有这个符号,这即引出了C++ o ...
- linux运维、架构之路-Logstash启动时指定jdk版本
一.修改bin/logstash vim /app//logstash-6.7.0/bin/logstash export JAVA_CMD="/app/jdk1.8.0_11/bin&qu ...
- 1.端口被占用问题:Embedded servlet container failed to start. Port 8097 was already in use.
1.端口被占用问题:Embedded servlet container failed to start. Port 8097 was already in use.netstat -anonetst ...
- CDOJ 1069 秋实大哥去打工 单调栈 下标处理
E - 秋实大哥去打工 Time Limit:1000MS Memory Limit:65535KB 64bit IO Format:%lld & %llu Submit St ...
- jenkins启动tomcat失败的解决方法
在网上看了都说是加BUILDID, 但是我加了之后,还是启动不成功. 执行了下面2个步骤: 1.在远程服务器的启动脚本里,用nohup来运行启动命令 nohup ./*.start.${prg}.sh ...
- [BZOJ3812]主旋律:状压DP+容斥原理
分析 Miskcoo orz 令\(f[S]\)表示使得\(S\)这个点集强连通的方案数. 然后呢?不会了 考虑到将一个有向图SCC缩点后,得到的新图是一个DAG,所以我们可以类比带标号DAG计数的解 ...
- 快速沃尔变换 FWT
P4717 [模板]快速沃尔什变换 #include<bits/stdc++.h> using namespace std; #define int long long #define s ...
- [design pattern](8) Command
前言 在前面的章节中,我们介绍了单例模式,它是创建型模式的一员.今天我们来介绍一下命令模式,它是行为型模式的一员. 思考题 首先,让我们来思考下面的问题: 话说有一家遥控器公司,他想制作一款很牛逼的遥 ...
- wannafly 挑战赛9 E 组一组 (差分约束)
链接:https://www.nowcoder.com/acm/contest/71/E 时间限制:C/C++ 3秒,其他语言6秒 空间限制:C/C++ 65536K,其他语言131072K Spec ...