Mybatis找不到参数错误:There is no getter for property named 'categoryId' in 'class java.lang.Integer'. 错误List<Post> listPage(Integer categoryId);在测试时报错:There is no getter for property named 'categoryId' in 'class java.lang.Integer' 问题分析:Mybatis默认采用ONGL解析参数
示例代码 之前的文章说过,对于MyBatis来说insert.update.delete是一组的,因为对于MyBatis来说它们都是update:select是一组的,因为对于MyBatis来说它就是select. 本文研究一下select的实现流程,示例代码为: public void testSelectOne() { System.out.println(mailDao.selectMailById(8)); } selectMailById方法的实现为: public Mail sele
先说下问题产生的背景: 最近在做一个用到MyBatis的项目,其中有个业务涉及到关联查询,我是将两个查询分开来写的,即嵌套查询,个人感觉这样更方便重用: 关联的查询使用到了动态sql,在执行查询时就出现了如下错误:Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'id' in 'class java.lang.Integer' 因为出现了这个问题,