编程时遇到如下错误
- Parameter 'id' not found. Available parameters are [0, 1, 2, param3, param1, param2]
修改前的DAO层方法如下
- List<Question> selectLatestQuestions(int userId, int offset,int limit);
添加了@Param("XXX")之后解决了问题
- List<Question> selectLatestQuestions(@Param("userId") int userId, @Param("offset") int offset,
- @Param("limit") int limit);