Controller
@RequestMapping("userList")
@ResponseBody
public Map getAll(HttpServletRequest request){
int currentPage=Integer.parseInt(request.getParameter("page"));
int pageSize=Integer.parseInt(request.getParameter("rows"));
int total = userService.getAllRecord();
List list =userService.getAllUser(currentPage,pageSize);
Map map=new HashMap();
map.put("total", total);
map.put("rows", list);
return map;
}
@RequestMapping("goMymain")
public String go(){
return "main";
}
@Override
public List getAllUser(int currentPage, int pageSize) {
Map
页面
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
用户信息列表
用户信息列表
You can add User,or Edit_User、Delete_User if you selected an user
用户ID
姓名
密码
用户信息
==========================================================================================================================================================
页面二使用datagrid
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
用户信息列表
easyui的DataGrid实例
学号
姓名
密码