int total=chongwuxinxiService.getCount(pmap);
pageBean.setTotal(total);
List<Chongwuxinxi> list=chongwuxinxiService.getByPage(pmap);
map.put("page", pageBean);
map.put("list", list);
session.setAttribute("p", 1);
return "chongwuxinxi_list";
int total=chongwuxinxiService.getCount(pmap); //获取宠物信息总条数
pageBean.setTotal(total);//把总条数赋值到分页对象属性
List<Chongwuxinxi> list=chongwuxinxiService.getByPage(pmap);//获取宠物信息所有数据集合
map.put("page", pageBean);//把分页对象放到map集合中
map.put("list", list);//把宠物信息所有数据集合放到map集合中
session.setAttribute("p", 1);.//在session中放入键值对,键“p”,值1
return "chongwuxinxi_list";//返回到宠物信息列表页面,这里使用到了springMVC的视图解析器,自动定位对应名称的页面