首页>代码>bootstrap-table实现ssm分页查询的简单实例>/BootStrap-Table/src/com/voicecodes/controller/StudentController.java
package com.voicecodes.controller; import java.util.HashMap; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import com.voicecodes.service.StudentService; @Controller @RequestMapping("student") public class StudentController { @Autowired private StudentService studentService; @RequestMapping("selectByFy") @ResponseBody public Map<String,Object> selectByFy(int pageSize,int pageNumber,String name,Integer age){ /*所需参数*/ Map<String, Object> param=new HashMap<String, Object>(); int a=(pageNumber-1)*pageSize; int b=pageSize; param.put("a", a); param.put("b", b); param.put("name", name); param.put("age", age); return studentService.selectByFy(param); } }