/**
* @see com.ibatis.sqlmap.client.SqlMapExecutor#queryForList(String, int, int)
* @throws org.springframework.dao.DataAccessException in case of errors
*/
List queryForList(String statementName, int skipResults, int maxResults)
throws DataAccessException;
这个是你这个方法的定义,后面两个参数不是你要传递给sql的参数,skipResults是或略的结果条数,maxResults是最多返回条数。
你的需求可以这么写:
java代码:
Mapmap = new HashMap ();
map.put("firstParam",0);
map.put("secondParam",6);
list=sqlMapClinet.queryForList("selectAll",map);
SQL(ibatis)
另外
1. 在ibatis中sql不要以分号结尾
2. 不建议直接用select * ,最好将各个字段写出来。
额...你把错误贴出来啊 报的什么错误啊