码迷,mamicode.com
首页 > 编程语言 > 详细

解决Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for com.geek.dao.ContentDao.Integer

时间:2017-08-07 13:40:50      阅读:306      评论:0      收藏:0      [点我收藏+]

标签:div   code   pre   rom   ati   修改   lang   result   sel   

mybatis报错:Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for com.geek.dao.ContentDao.Integer

 

出错原因:一个手误

  <select id="selectAllFirstNavigationName" resultMap="firstNavigation">
        SELECT first_navigation_name
        FROM first_navigation
    </select>

 

修改方法:将resultMap修改为resultType,因为返回的是基本的数据类型

 

resultType和resultMap的区别:resultType是直接表示返回类型的,而resultMap则是对外部ResultMap的引用

 

解决Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for com.geek.dao.ContentDao.Integer

标签:div   code   pre   rom   ati   修改   lang   result   sel   

原文地址:http://www.cnblogs.com/Hdaydayup/p/7298346.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!