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

时间:2017-08-07 12:42:33   收藏:0   阅读:3533

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的引用

 

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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!