package com.hao.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.hao.entity.Student;
import com.hao.mappers.StudentMapper;
@Controller
@RequestMapping("student")
public class StudentController {
@Autowired
StudentMapper studentMapper;
@RequestMapping("list")
public ModelAndView queryStudent(Integer pageNum,Student student) {
ModelAndView mv = new ModelAndView();
List<Student> stuList = studentMapper.queryStudentList();
mv.addObject("stuList", stuList);
return mv;
}
}
靠乞求得到的,都是别人不需要的。
《猎场》
本文介绍了一个使用Spring框架实现的学生信息管理系统,该系统通过StudentController类处理学生数据的查询请求。系统利用了StudentMapper接口与数据库进行交互,实现了学生列表的查询功能。
799

被折叠的 条评论
为什么被折叠?



