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

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

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