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

来源:互联网 发布:python怎么多线程并发 编辑:程序博客网 时间:2024/06/08 08:40

编程时遇到如下错误

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

修改前的DAO层方法如下

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

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

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

阅读全文
1 0
原创粉丝点击