mybatis报错:A query was run and no Result Maps were found for the Mapped Statement
来源:互联网 发布:ff14高地男捏脸数据 编辑:程序博客网 时间:2024/05/22 08:20
今天编辑mybatis的xml文件,出现如下错误:
程序出现异常[A query was run and no Result Maps were found for the Mapped Statement '***'. It's likely that neither a Result Type nor a Result Map was specified.
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:76) ~[mybatis-spring-1.2.3.jar:1.2.3]
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:399) ~[mybatis-spring-1.2.3.jar:1.2.3]
at com.sun.proxy.$Proxy54.selectList(Unknown Source) ~[?:?]
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:205) ~[mybatis-spring-1.2.3.jar:1.2.3]………………
仔细查看mybatis的配置文件,发现遗漏一个属性:resultType
报错的配置是:<select id="ID" parameterType="java.util.Map">正确的配置应该是<select id="ID" parameterType="java.util.Map" resultType="java.util.Map">
最后总结下,就是mybatis中的所有查询,都必须返回resultType或者resultMap的值,否则就会报如上错误的。
- mybatis报错: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
- Mybatis报错—— A query was run and no Result Maps were found for the Mapped Statement
- A query was run and no Result Maps were found for the Mapped Statement
- A query was run and no Result Maps were found for the Mapped Statement
- A query was run and no Result Maps were found for the Mapped Statement
- 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
- A query was run and no Result Maps were found for the Mapped Statement 'com.atguigu.atcrowdfunding.p
- FAQ(15):A query was run and no Result Maps were found for the Mapped Statement 'com.smbms.dao.UserMa
- A query was run and no Result Maps were found
- A query was run and no Result Maps were found
- org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the
- MyBatis报错:Result Maps collection already contains value for .....
- mybatis报错Result Maps collection already contains value for
- mybatis中Invalid bound statement (not found) 和 Result Maps collection already contains value for...错误解决方案
- 报错:No result defined for action and result input
- No default view was found for object type 10201 and query type 2
- HDU 1548---A strange lift(搜索&&最短路)
- u-boot-2016.09移植(6)-dm9000
- c语言编写,2/1,3/2,5/3,8/5....这个数列的前20 项和
- filter过滤筛选
- 【封装】Fragment切换的方法
- mybatis报错:A query was run and no Result Maps were found for the Mapped Statement
- BOM(byte-order mark):字节顺序标记
- JDBC
- 第十周 小学生百以内算术考试系统
- nyoj 303 序号互换 第四届河南省赛
- C++_STL_数据结构_stack_栈
- LeetCode 第四十五题(Jump Game II)Java
- hashmap 死循环解析
- python signal handling