基于javaweb+springboot的在线考试系统(前台、后台)(java+Springboot+ssm+mysql+jsp+maven)
一、项目简述
本系统主要实现的功能有: 学生以及老师的注册登录,在线考试,错题查询,学生管理,问题管理,错题管理,错题查询,分数查询,试卷管 理,人工组卷。自动组卷,教师,班级,统计等等管理功能。
二、项目运行
环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts 都支持)
项目技术: Springboot+ SpringMVC + MyBatis + ThymeLeaf + JavaScript + JQuery + Ajax + maven等等!请添加图片描述
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
![](https://java8888.coding.net/p/img/d/i1/git/raw/master/1.jpg)
@RequestMapping("/addExam")
public String addExam(Exam exam, String examBegins,String examEnds) throws ParseException {
String t1 = examBegins.replace("T", " ");
String t2 = examEnds.replace("T", " ");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
Date begin = sdf.parse(t1);
Date end = sdf.parse(t2);
exam.setExamBegin(begin);
exam.setExamEnd(end);
examService.AddExam(exam);
return "redirect:/exam/getAllExam";
}
@RequestMapping("/deleteExam/{id}")
public String toEditExam(@PathVariable ("id") Integer id,Model model){
examService.deleteById(id);
return "redirect:/exam/getAllExam";
}
}
记录信息控制层:
@Controller
@RequestMapping("/record")
//前台学生登录考试
@ResponseBody
@RequestMapping("/foreCheck/check")
public Object foreCheck(Student student, HttpServletRequest request){
AjaxResult result=new AjaxResult();
HttpSession session=request.getSession();
Student stud=studentService.check(student);
if(stud!=null){
session.setAttribute("loger",stud);
result.setSuccess(true);
}else {
result.setSuccess(false);
}
return result;
}
//前台登录到展示页面
@RequestMapping("/indexprexam")
public String indexprexam(){
return "stage/prexamed";
}
//退出系统
@RequestMapping(value = {
"*/logout","/logout","teacher/logout"})
public String logout(HttpSession session) {
public String toError(Model model){
List<Exam> Exams = examService.getAll();
model.addAttribute("Exams",Exams);
return "exam/error";
}
@RequestMapping("/tomError")
public String tomError(Model model){
List<Exam> Exams = examService.getAll();
model.addAttribute("Exams",Exams);
return "exam/merror";
}
@RequestMapping("/toHist/{id}")
public String toHist(@PathVariable ("id") Integer id,Model model){
y++;
}
b++;
k++;
}else {
if(ans.get(k).equals(RightAns.get(k))){
score+=qb.getPaper().getScoreJug();
y++;
}
c++;
k++;
}
}
int scoreSin1 = questionPapers.get(0).getPaper().getScoreSin();
int scoreChe1 = questionPapers.get(0).getPaper().getScoreChe();
int scoreJug1 = questionPapers.get(0).getPaper().getScoreJug();
int bool=recordService.queryBooleanToscore(paperId);
if (bool==0){
totalScore=scoreSin1*a+scoreChe1*b+scoreJug1*c; //得到每张试卷总分
Toscore toscore=new Toscore();
session.invalidate();
return "redirect:/";
}
//学生注册
//去添加页面
@RequestMapping("/prexam/toAddStudent")
public String toAddStudent