Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring mvc 如何在spring mvc中执行分页? //这是我的控制器,它给了我一个列表。。。。。。。。。。。。 @请求映射(“/getList”) 公共模型和视图获取列表(模型模型){ List empList=empService.getEmpList(); 员工emp=新员工(); model.addAttribute(“员工”,emp); 返回新的ModelAndView(“empList”、“empList”、“empList”); }_Spring Mvc - Fatal编程技术网

Spring mvc 如何在spring mvc中执行分页? //这是我的控制器,它给了我一个列表。。。。。。。。。。。。 @请求映射(“/getList”) 公共模型和视图获取列表(模型模型){ List empList=empService.getEmpList(); 员工emp=新员工(); model.addAttribute(“员工”,emp); 返回新的ModelAndView(“empList”、“empList”、“empList”); }

Spring mvc 如何在spring mvc中执行分页? //这是我的控制器,它给了我一个列表。。。。。。。。。。。。 @请求映射(“/getList”) 公共模型和视图获取列表(模型模型){ List empList=empService.getEmpList(); 员工emp=新员工(); model.addAttribute(“员工”,emp); 返回新的ModelAndView(“empList”、“empList”、“empList”); },spring-mvc,Spring Mvc,我的问题是我在一页中有一个员工列表。如果我有100名员工,我需要在下一页中显示他们。因此,当我单击“上一页”按钮时,在下一页上按“上一页”按钮时显示的上一页列表半身像必须通过保持“下一页”和“上一页”按钮来显示。请给出如何执行该操作的解决方案。有什么办法吗给我解决方案使用Spring数据JPA并创建一个存储库。它支持分页(和排序!)@RequestMapping(“/getList”)公共模型和查看getList(@RequestParam(value=“page”,required=false

我的问题是我在一页中有一个员工列表。如果我有100名员工,我需要在下一页中显示他们。因此,当我单击“上一页”按钮时,在下一页上按“上一页”按钮时显示的上一页列表半身像必须通过保持“下一页”和“上一页”按钮来显示。请给出如何执行该操作的解决方案。

有什么办法吗给我解决方案使用Spring数据JPA并创建一个存储库。它支持分页(和排序!)@RequestMapping(“/getList”)公共模型和查看getList(@RequestParam(value=“page”,required=false)整数页,模型模型,@RequestParam(value=“page\u size”,required=false)整数页大小){page=0;page\u size=10;if(page==0){page=page+page\u size;}List empList empService.getEmpList1(page,page_size);Employee emp=new Employee();model.addAttribute(“Employee”,emp);return new ModelAndView(“empList”,“empList”,empList);}这是我的控制器,我需要执行此操作我不应该使用jpa。请告诉我怎么做?
        //this is my controller which gives me a list............
         @RequestMapping("/getList")
             public ModelAndView getList(Model model){
                 List<Employee> empList = empService.getEmpList();  
                  Employee emp=new Employee();
                  model.addAttribute("employee", emp);
                  return new ModelAndView("empList", "empList", empList);  
             }