eclipse提示这个问题是为什么啊?
public PageInfo<Student> list(Student student,PageInfo<Student> pageInfo) throws SQLException{
QueryRunner queryRunner = new QueryRunner(PropertiesUtils.getDataSource());
String sql = "select * from student limit "+(pageInfo.getPageNo()-1)*pageInfo.getPageSize()+" , "+pageInfo.getPageSize();
List<Student> list = queryRunner.query(sql, new BeanListHandler<>(Student.class));
pageInfo.setList(list);
pageInfo.setTotalCount(this.count(student));
return pageInfo;
}
private void list(HttpServletRequest request, HttpServletResponse response){
//当前页码数
Integer pageNo = getIntParameter(request, "pageNo");
PageInfo<Student> pageInfo = new PageInfo<>(pageNo);
try {
pageInfo = DaoFactory.getInstance().getStudentDao().list(null,pageInfo);
} catch (SQLException e1) {
e1.printStackTrace();
}
有没有懂的呀求解答
调用list()不要传null