Parameter 'districtId' not found. Available parameters are [0, 1, 2, param3, param1, param2]


编程时遇到如下错误

[java]  view plain  copy
  1. Parameter 'id' not found. Available parameters are [012, param3, param1, param2]  

修改前的DAO层方法如下

[java]  view plain  copy
  1. List<Question> selectLatestQuestions(int userId, int offset,int limit);  

添加了@Param("XXX")之后解决了问题

[java]  view plain  copy
  1. List<Question> selectLatestQuestions(@Param("userId"int userId, @Param("offset"int offset,  
  2.                                      @Param("limit"int limit);  

猜你喜欢

转载自blog.csdn.net/gaoweipeng238/article/details/80671414