基于javaweb+mysql的ssm+maven学生选课管理系统(java+ssm+bootstrap+javascript+mysql)
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb+mysql的SSM+Maven学生选课管理系统(java+ssm+bootstrap+javascript+mysql)
项目介绍
由SpringMVC+MyBatis为主要框架,mysql8.0配置主从复制实现读写分离。前端主要由bootstrap完成,背景用particles.js插件。数据库交互查询用到pagehelper分页。在添加修改相关功能时通过ajax来验证其主键是否存在可用。代码层次清晰,输入框约束较高,已配置登录拦截。 项目主要分为管理员、教师、学生三种角色; 管理员角色包含以下功能: 管理员登录,学生管理,教师管理,课程管理等功能。 教师角色包含以下功能: 登录界面,查看课程,建立课程计划,管理教学课程,成绩查询结课等功能。 学生角色包含以下功能: 登录界面,选课,确认选课,查看选课结果,退选界面,查看已修课程,管理个人信息等功能。
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.数据库:MySql 5.7版本; 6.是否Maven项目:是;
技术栈
- 后端:Spring+SpringMVC+Mybatis 2. 前端:JavaScript、jQuery、bootstrap、particles.js、ajax
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中applicationContext.xml配置文件中的数据库配置改为自己的配置;注:因为此处为读写分离的,需要配置2处; 4. 运行项目,输入localhost:8080/ 登录 管理员账号/密码:admin/admin 教师账号/密码: 0002/123456 学生账号/密码:201507021227/123456
System.out.println(couList);
}
return "teacher/manageCourse";
}
// 修改
@RequestMapping("/moditypw/{tid}")
public ModelAndView teacherModi(@PathVariable(value = "tid") String tid, Model model, HttpServletRequest request) {
System.out.print(request.getRemoteAddr());
return new ModelAndView(new RedirectView("../../teacher/modityPw.jsp"));
}
@RequestMapping("/moditypassword/{tid}")
public ModelAndView teacherModiPw(@PathVariable(value = "tid") String tid,
@RequestParam("tpassword") String tpassword, Model model) {
if (teacherService.modifyTeacherPwd(tpassword, tid) != 0) {
return new ModelAndView(new RedirectView("../queryvita/{tid}"));
} else {
return new ModelAndView(new RedirectView("../fail.jsp"));
}
}
@RequestMapping(value = "/sercsc/{tid}/{pn}", method = RequestMethod.GET)
public String sercChoose(@PathVariable("tid") String tid, StuSelectResult ssr, Model model, HttpSession httpSession,
@PathVariable(value = "pn") String pn) {
int no = Integer.parseInt(pn);
PageHelper.startPage(no, 5);
List<StuExitSelect> sesList = new ArrayList<StuExitSelect>();
sesList = selectCourseService.getLookByTid(1, 10, tid);
pageIn(model, sesList);
httpSession.setAttribute("sesList", sesList);
return "teacher/serchSC";
}
// 查询
// 查询,根据cid查询老师
@RequestMapping(value = "/selcou/{cid}", method = RequestMethod.GET)
public String selCou(@PathVariable(value = "cid") String cid, Model model) {
// 代优化
List<CoursePlan> lists = null;
lists = coursePlanService.getTidByCoursePlanCid(1, 10, cid);
System.out.println("------" + lists.size());
Teacher teacher = new Teacher();
Course course = new Course();
if (lists.size() != 0) {
System.out.println("-----进入选课");
String tid = lists.get(0).getTid();
teacher = teacherService.getByTeaTid(tid);
model.addAttribute("tname", teacher.getTname());
model.addAttribute("inroduction", teacher.getIntroduction());
System.out.println(teacher.getIntroduction() + "-----------------------");
course = courseService.getByCouCid(cid);
model.addAttribute("cname", course.getCname());
model.addAttribute("cid", cid);
return "student/seling";
} else {
System.out.println("-----进入无教师选课");
course = courseService.getByCouCid(cid);
model.addAttribute("cname", course.getCname());
model.addAttribute("cid", cid);
return "student/noseling";
}
}
// 加入课程
@RequestMapping("/seling")
public String confirmSelect(@RequestParam("cid") String cid, @RequestParam("sid") String sid, Model model,
HttpSession httpSession, HttpServletRequest httpRequest) {
// 判断是否加入过此课程
if (selectCourseService.existCourse(cid, sid) != null) {
httpRequest.setAttribute("msg", "已经加入过该课程,不能重复加入!");
System.out.println("已经加入过该课程,不能重复加入!");
return "fail";
}
if (selectCourseService.selectCourse(cid, sid) != 0) {
System.out.println(cid);
System.out.println(sid);
return "success";
} else {
return "fail";
}
}
List<Student> studentList = new ArrayList<Student>();
studentList = studentService.getByStudentSid(1,10,sid);
request.setAttribute("studentList", studentList);
System.out.println("-----进入修改");
return "admin/modiStudent";
}
// 修改
@RequestMapping(value = "/moditystud/{sid}", method = RequestMethod.GET)
public String update(@PathVariable("sid") String sid, Student student, HttpServletRequest request) {
int col = Integer.parseInt(student.getCollege());
int pro = Integer.parseInt(student.getProfession());
int cla = Integer.parseInt(student.getClassr());
//总感觉前端js写的有问题。
student.setCollege(arr_belongcoll[pro]);
student.setProfession(arr_belongpro[pro][col]);
student.setClassr(arr_belongcla[pro][col][cla]);
if (studentService.modifyStudent(student) != 0) {
System.out.println("----修改成功--------------------------------------------------------------------------------------------------------");
return "success";
} else {
System.out.println("----修改失败----------------------------------------------------------------");
return "fail";
}
}
// 跳转页面
@RequestMapping("/managestu/{pn}")
public String manageStudent(HttpServletRequest request,
@PathVariable(value = "pn") String pn,Model model) {
int no = Integer.parseInt(pn);
PageHelper.startPage(no, 5);
List<Student> studentList = new ArrayList<Student>();
studentList = studentService.selectStudentBySql(1,100);
pageIn(model, studentList);
request.setAttribute("slist", studentList);
return "admin/queryStudent";
}
// 跳转页面
@RequestMapping("/managetea/{pn}")
public String manageTeacher(HttpServletRequest request,
@PathVariable(value = "pn") String pn,Model model) {
int no = Integer.parseInt(pn);
if (cPlanList != null) {
httpSession.setAttribute("cPlanList", cPlanList);
System.out.println(cPlanList);
return "teacher/modCouPlan";
} else {
return "fail";
}
}
//修改
@RequestMapping("/moditycouplan/{tid}")
public ModelAndView modityCouPlan(@PathVariable(value = "tid") String tid, CoursePlan coursePlan) {
if (coursePlanService.modifyCoursePlan(coursePlan) != 0) {
return new ModelAndView(new RedirectView("/StudentInfo/TeacherHandler/managecou/{tid}/1"));
} else {
return new ModelAndView(new RedirectView("/StudentInfo/fail.jsp"));
}
}
//删除
@RequestMapping("/delcouplan/{courseclass}/{tid}")
public ModelAndView modityCouPlan(@PathVariable(value = "courseclass") String courseclass,
@PathVariable(value = "tid") String tid, HttpSession httpSession) {
if (coursePlanService.deleteCoursePlan(courseclass) != 0) {
httpSession.removeAttribute("couList");
httpSession.removeAttribute("coursePlanList");
return new ModelAndView(new RedirectView("/StudentInfo/TeacherHandler/managecou/{tid}/1"));
} else {
return new ModelAndView(new RedirectView("/StudentInfo/fail.jsp"));
}
}
Model model, HttpSession httpSession, HttpServletRequest httpRequest) {
Student student = new Student();
student = studentService.getByStuSid(sid);
if (studentService.queryByNamePwd(sid, spassword) != null) {
httpSession.setAttribute("sid", sid);
httpSession.setAttribute("sname", student.getSname());
return new ModelAndView(new RedirectView("../student/studentFace.jsp"));
} else {
httpRequest.setAttribute("msg","账号或密码不正确,登录失败!");
return new ModelAndView(new RedirectView("../fail.jsp"));
}
}
// 学生退出登录
@RequestMapping("/studentlogout")
public ModelAndView studentLogout(HttpSession httpSession) {
httpSession.removeAttribute("sid");
httpSession.removeAttribute("sname");
httpSession.removeAttribute("courseList");
httpSession.removeAttribute("ssrList");
httpSession.removeAttribute("sesList");
return new ModelAndView(new RedirectView("/StudentInfo/index.jsp"));
}
// 教师登录
@RequestMapping("/teacherlogin")
public ModelAndView loginTeacher(@RequestParam("tid") String tid, @RequestParam("tpassword") String tpassword,
Model model, HttpSession httpSession) {
if (teacherService.queryByNamePwd(tid, tpassword) != null) {
Teacher teacher = new Teacher();
teacher = teacherService.getByTeaTid(tid);
// model.addAttribute("tid", tid);
httpSession.setAttribute("tid", tid);
httpSession.setAttribute("tname", teacher.getTname());
// httpSession.setAttribute("teachername", teacher.getTname());
@RequestMapping("/studentlogin")
public ModelAndView loginStudent(@RequestParam("sid") String sid, @RequestParam("spassword") String spassword,
Model model, HttpSession httpSession, HttpServletRequest httpRequest) {
Student student = new Student();
student = studentService.getByStuSid(sid);
if (studentService.queryByNamePwd(sid, spassword) != null) {
httpSession.setAttribute("sid", sid);
httpSession.setAttribute("sname", student.getSname());
return new ModelAndView(new RedirectView("../student/studentFace.jsp"));
} else {
httpRequest.setAttribute("msg","账号或密码不正确,登录失败!");
return new ModelAndView(new RedirectView("../fail.jsp"));
}
}
// 学生退出登录
@RequestMapping("/studentlogout")
public ModelAndView studentLogout(HttpSession httpSession) {
httpSession.removeAttribute("sid");
httpSession.removeAttribute("sname");
httpSession.removeAttribute("courseList");
httpSession.removeAttribute("ssrList");
httpSession.removeAttribute("sesList");
return new ModelAndView(new RedirectView("/StudentInfo/index.jsp"));
}
// 教师登录
@RequestMapping("/teacherlogin")
public ModelAndView loginTeacher(@RequestParam("tid") String tid, @RequestParam("tpassword") String tpassword,
Model model, HttpSession httpSession) {
if (teacherService.queryByNamePwd(tid, tpassword) != null) {
Teacher teacher = new Teacher();
teacher = teacherService.getByTeaTid(tid);
// model.addAttribute("tid", tid);
ssrList = selectCourseService.getSCBySid(1, 10, sid);
pageIn(model, ssrList);
request.setAttribute("ssrList", ssrList);
return "student/selectedCourse";
}
// 所选课程列表详情-----退选
@RequestMapping(value = "/exitchoose/{sid}/{pn}", method = RequestMethod.GET)
public String exitChoose(@PathVariable("sid") String sid, StuSelectResult ssr, HttpServletRequest request,
@PathVariable(value = "pn") String pn, Model model) {
List<StuExitSelect> sesList = new ArrayList<StuExitSelect>();
sesList = selectCourseService.getExitBysid(1, 10, sid);
pageIn(model, sesList);
request.setAttribute("sesList", sesList);
return "student/exitSel";
}
// 退选
@RequestMapping(value = "/exitsel/{cid}/{sid}", method = RequestMethod.GET)
public ModelAndView exitSel(@PathVariable("cid") String cid, @PathVariable("sid") String sid) {
if (selectCourseService.deleteSC(cid, sid) != 0) {
return new ModelAndView(new RedirectView("/StudentInfo/StudentHandler/exitchoose/{sid}/1"));
} else {
return new ModelAndView(new RedirectView("../fail.jsp"));
}
}
// 学生查询本人选课
@RequestMapping(value = "/endcourse/{sid}/{pn}", method = RequestMethod.GET)
public String endcourse(@PathVariable("sid") String sid, Grade grade, HttpServletRequest request,
@PathVariable(value = "pn") String pn, Model model) {
List<Grade> endCourseList = new ArrayList<Grade>();
endCourseList = gradeService.getEedCourseBySid(1, 10, sid);
pageIn(model, endCourseList);
httpRequest.setAttribute("msg","账号或密码不正确,登录失败!");
return new ModelAndView(new RedirectView("../fail.jsp"));
}
}
// 学生退出登录
@RequestMapping("/studentlogout")
public ModelAndView studentLogout(HttpSession httpSession) {
httpSession.removeAttribute("sid");
httpSession.removeAttribute("sname");
httpSession.removeAttribute("courseList");
httpSession.removeAttribute("ssrList");
httpSession.removeAttribute("sesList");
return new ModelAndView(new RedirectView("/StudentInfo/index.jsp"));
}
// 教师登录
@RequestMapping("/teacherlogin")
public ModelAndView loginTeacher(@RequestParam("tid") String tid, @RequestParam("tpassword") String tpassword,
Model model, HttpSession httpSession) {
if (teacherService.queryByNamePwd(tid, tpassword) != null) {
Teacher teacher = new Teacher();
teacher = teacherService.getByTeaTid(tid);
// model.addAttribute("tid", tid);
httpSession.setAttribute("tid", tid);
httpSession.setAttribute("tname", teacher.getTname());
// httpSession.setAttribute("teachername", teacher.getTname());
return new ModelAndView(new RedirectView("../teacher/teacherFace.jsp"));
} else {
return new ModelAndView(new RedirectView("../fail.jsp"));
}
}
// 教师退出登录
@RequestMapping("/teacherlogout")
public ModelAndView teacherLogout(HttpSession httpSession) {
httpSession.removeAttribute("tid");
httpSession.removeAttribute("tname");
httpSession.removeAttribute("couList");
httpSession.removeAttribute("sesList");
httpSession.removeAttribute("lookList");
return new ModelAndView(new RedirectView("/StudentInfo/index.jsp"));
}
}
// 查询,根据cid查询老师
@RequestMapping(value = "/selcou/{cid}", method = RequestMethod.GET)
public String selCou(@PathVariable(value = "cid") String cid, Model model) {
// 代优化
List<CoursePlan> lists = null;
lists = coursePlanService.getTidByCoursePlanCid(1, 10, cid);
System.out.println("------" + lists.size());
Teacher teacher = new Teacher();
Course course = new Course();
if (lists.size() != 0) {
System.out.println("-----进入选课");
String tid = lists.get(0).getTid();
teacher = teacherService.getByTeaTid(tid);
model.addAttribute("tname", teacher.getTname());
model.addAttribute("inroduction", teacher.getIntroduction());
System.out.println(teacher.getIntroduction() + "-----------------------");
course = courseService.getByCouCid(cid);
model.addAttribute("cname", course.getCname());
model.addAttribute("cid", cid);
return "student/seling";
} else {
System.out.println("-----进入无教师选课");
course = courseService.getByCouCid(cid);
model.addAttribute("cname", course.getCname());
model.addAttribute("cid", cid);
return "student/noseling";
}
}
// 加入课程
@RequestMapping("/seling")
public String confirmSelect(@RequestParam("cid") String cid, @RequestParam("sid") String sid, Model model,
HttpSession httpSession, HttpServletRequest httpRequest) {
// 判断是否加入过此课程
if (selectCourseService.existCourse(cid, sid) != null) {
httpRequest.setAttribute("msg", "已经加入过该课程,不能重复加入!");
System.out.println("已经加入过该课程,不能重复加入!");
return "fail";
}
if (selectCourseService.selectCourse(cid, sid) != 0) {
System.out.println(cid);
System.out.println(sid);
return "success";
} else {
return "fail";
}
}
//跳转到queryCourse页面
@RequestMapping("/managecou/{pn}")
public String manageCourse(HttpServletRequest request,@PathVariable(value = "pn") String pn,Model model) {
int no = Integer.parseInt(pn);
List<Course> courseList = new ArrayList<Course>();
PageHelper.startPage(no, 5);
courseList = courseService.selectCourseBySql(1,10);
pageIn(model, courseList);
request.setAttribute("courseList", courseList);
return "admin/queryCourse";
}
}
/**
* @ProjectName: StudentInfo
* @Package: net.fuzui.StudentInfo.handler
* @ClassName: AdminHandler
* @Description: admin的handler层(servlet)
* @UpdateUser: 王泽
}
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
ModelAndView modelAndView) throws Exception {
// TODO Auto-generated method stub
System.out.println("postHandle");
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
throws Exception {
// TODO Auto-generated method stub
System.out.println("afterCompletion");
}
}
/**
*
* @ProjectName: StudentInfo
* @Package: net.fuzui.StudentInfo.interceptor
* @ClassName: TeacherLoginInterceptor
* @Description: 教师登录拦截
* @UpdateUser: 王泽
* @UpdateRemark: 新建
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception {
// TODO Auto-generated method stub
Object sid = request.getSession().getAttribute("tid");
if (sid == null) {
System.out.println("尚未登录,调到登录页面");
response.sendRedirect("/StudentInfo/index.jsp");
return false;
}
return true;
}
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
ModelAndView modelAndView) throws Exception {
// TODO Auto-generated method stub
System.out.println("postHandle");
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
throws Exception {
// TODO Auto-generated method stub
System.out.println("afterCompletion");
}
}
/**
*
* @ProjectName: StudentInfo
* @Package: net.fuzui.StudentInfo.interceptor
* @ClassName: LoginInterceptor
* @Description: 登录拦截器
* @UpdateUser: 王泽
* @UpdateRemark: 新建
student.setProfession(arr_belongpro[pro][col]);
student.setClassr(arr_belongcla[pro][col][cla]);
if (studentService.insertStudent(student) != 0) {
model.addAttribute("student", student);
return "success";
// return "admin/addStudent";
} else {
return "fail";
}
}
//查询全部学生方法
public void queryStu(HttpServletRequest request) {
List<Student> studentList = new ArrayList<Student>();
studentList = studentService.selectStudentBySql(1,10);
request.setAttribute("slist", studentList);
}
public void pageIn(Model model,List list) {
PageInfo page = new PageInfo(list, 5);
model.addAttribute("pageInfo", page);
}
// 查询
@RequestMapping(value = "/query/{pn}", method = RequestMethod.GET)
public String redirect(@RequestParam("serc") String serc, @RequestParam("condition") String condition,HttpServletRequest request,
@PathVariable(value = "pn") String pn,Model model) {
int no = Integer.parseInt(pn);
// System.out.println("-----"+no+"----");
List<Student> studentList = new ArrayList<Student>();
PageHelper.startPage(no, 5);
request.setAttribute("serc", serc);
request.setAttribute("condition", condition);
//查询全部
if (serc.equals("all")) {
/**
*
*/
@Controller
@RequestMapping("/TeacherHandler")
public class TeacherHandler {
@Autowired
StudentService studentService;
@Autowired
TeacherService teacherService;
@Autowired
CoursePlanService coursePlanService;
@Autowired
CourseService courseService;
@Autowired
SelectCourseService selectCourseService;
@Autowired
GradeService gradeService;
// 添加
@RequestMapping("/addcou")
public String addCou() {
return "teacher/addCou";
}
@RequestMapping("/sercsc")
public String sercSC() {
return "teacher/serchSC";
}
/*
public String addTeacher(Teacher teacher, Model model, HttpSession httpSession) {
if (teacherService.insertTeacher(teacher) != 0) {
model.addAttribute("teacher", teacher);
//---------------------------------待优化-----同样不能实时刷新--------------------------------------------
return "success";
//return new ModelAndView(new RedirectView("/StudentInfo/TeacherHandler/finalPage"));
// return "techer/teacherFace";
} else {
return "fail";
//return new ModelAndView(new RedirectView("fail"));
}
}
/**
* 教师相关
*/
//查询全部教师方法
public void queryTea(HttpServletRequest request) {
List<Teacher> teacherList = new ArrayList<Teacher>();
teacherList = teacherService.selectTeacherBySql(1,10);
request.setAttribute("teacherList", teacherList);
}
// 查询
@RequestMapping(value = "/queryTea/{pn}", method = RequestMethod.GET)
public String redirectTea(@RequestParam("serc") String serc, @RequestParam("condition") String condition,HttpServletRequest request,
@PathVariable(value = "pn") String pn,Model model) {
int no = Integer.parseInt(pn);
PageHelper.startPage(no, 5);
List<Teacher> teacherList = new ArrayList<Teacher>();
request.setAttribute("serc", serc);
request.setAttribute("condition", condition);
if (serc.equals("all")) {
teacherList = teacherService.selectTeacherBySql(1,10);
pageIn(model, teacherList);
request.setAttribute("teacherList", teacherList);
return "admin/queryTeacher";
return "teacher/addCou";
} else if (serc.equals("type")) {
courseList = courseService.getByCourseType(1,10,condition);
pageIn(model, courseList);
httpSession.setAttribute("courseList", courseList);
System.out.println(courseList);
System.out.println("pro");
return "teacher/addCou";
} else {
courseList = courseService.selectCourseBySql(1,10);
pageIn(model, courseList);
httpSession.setAttribute("courseList", courseList);
System.out.println(courseList);
return "teacher/addCou";
}
}
//修改课程方案
@RequestMapping("/modicouplan/{courseclass}")
public String modiCouPlan(@PathVariable(value = "courseclass") String courseclass, Model model,
HttpSession httpSession) {
List<CoursePlan> cPlanList = new ArrayList<CoursePlan>();
cPlanList = coursePlanService.getByCoursePlanCourseclass(1,10,courseclass);
if (cPlanList != null) {
httpSession.setAttribute("cPlanList", cPlanList);
System.out.println(cPlanList);
return "teacher/modCouPlan";
} else {
return "fail";
}
}
//修改
@RequestMapping("/moditycouplan/{tid}")
public ModelAndView modityCouPlan(@PathVariable(value = "tid") String tid, CoursePlan coursePlan) {
if (coursePlanService.modifyCoursePlan(coursePlan) != 0) {
return new ModelAndView(new RedirectView("/StudentInfo/TeacherHandler/managecou/{tid}/1"));
} else {
return new ModelAndView(new RedirectView("/StudentInfo/fail.jsp"));
* @UpdateUser: 王泽
* @UpdateRemark: 新建
* @Version: 1.0
*/
@Controller
@RequestMapping("/LoginHandler")
public class LoginHandler {
@Autowired
AdminService adminServiceImpl;
@Autowired
StudentService studentService;
@Autowired
TeacherService teacherService;
//管理员登录
@RequestMapping("/adminlogin")
public String loginStudent(@RequestParam("aname") String aname, @RequestParam("apassword") String apassword,
Model model, HttpSession httpSession) {
String n = null;
n = adminServiceImpl.queryByNamePwd(aname,apassword);
if (n != null && !"".equals(n)) {
httpSession.setAttribute("aname", aname);
return "admin/adminFace";
} else {
return "fail";
}
}
// 管理员退出登录
@RequestMapping("/adminlogout")
public ModelAndView adminLogout(HttpSession httpSession) {
httpSession.removeAttribute("aname");
httpSession.removeAttribute("couList");
return new ModelAndView(new RedirectView("/StudentInfo/index.jsp"));
}
// 学生登录
@RequestMapping("/studentlogin")
public ModelAndView loginStudent(@RequestParam("sid") String sid, @RequestParam("spassword") String spassword,
/**
*
*/
@Controller
@RequestMapping("/StudentHandler")
public class StudentHandler {
@Autowired
StudentService studentService;
@Autowired
TeacherService teacherService;
@Autowired
CoursePlanService coursePlanService;
@Autowired
CourseService courseService;
@Autowired
SelectCourseService selectCourseService;
@Autowired
GradeService gradeService;
// 查询
@RequestMapping("/queryvitastu/{sid}")
public String queryVita(@PathVariable(value = "sid") String sid, Model model) {