基于javaweb的SpringBoot考试报名管理系统(java+springboot+maven+vue+elemen-ui)

运行环境

Java≥8、MySQL≥5.7、Node.js≥14

开发工具

后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可

❗没学过node.js的不要搞前后端分离项目

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

002224051303

012224051303

022224051303

032224051303

052224051303

062224051303

072024453108

基于javaweb的SpringBoot考试报名管理系统(java+springboot+maven+vue+elemen-ui)

管理员:
admin 123456

学生:
220052070349 123456
220052070350 123456
220052070351 123456

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@RequestMapping("/updatePwd")
public ResponseDto updatePwd(@RequestBody StudentPojo studentPojo){
if (studentService.updatePwd(studentPojo.getStudentId(),studentPojo.getPwd()) != null){
return ResponseDto.ok();
}else {
return ResponseDto.fail();
}
}

@RequestMapping("/show")
public ResponseDto showExams(@RequestBody ExamPojo examPojo){
return ResponseDto.ok(studentService.showExams(examPojo),studentService.countExams(examPojo));
}

@RequestMapping("/apply")
public ResponseDto applyExam(@RequestBody AdmissionPojo admissionPojo){
if (studentService.check(admissionPojo) == null){
if (studentService.applyExam(admissionPojo) != 0){
return ResponseDto.ok("报名成功");
}else{
return ResponseDto.fail("报名失败");
}
}else {
return ResponseDto.fail();
}
}

@RequestMapping("/delete")
public ResponseDto delete(String admissionId){
if (studentService.delete(admissionId) != 0){
return ResponseDto.ok("取消考试成功");
}else {
return ResponseDto.fail();
}
}

@RequestMapping("/showAdmissions")
public ResponseDto show(@RequestBody AdmissionVo admissionVo){
if (studentService.show(admissionVo) != null){
return ResponseDto.ok(studentService.show(admissionVo),studentService.count(admissionVo));
}else {
return ResponseDto.fail();
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33



@RestController
@RequestMapping("/student")
public class StudentController {
@Autowired
private StudentService studentService;
//验证码
@RequestMapping("/code")
public ResponseDto code() {
ValidateCodeUtil validateCodeUtil = new ValidateCodeUtil();
//随机生成验证码图片
String imgBase64 = validateCodeUtil.getRandomCodeImage();
//生成验证码
String code = validateCodeUtil.getCode();
//生成uuid
String uuid = UUID.randomUUID().toString();
ValidateCodeVo validateCodeVo = new ValidateCodeVo();
validateCodeVo.setUuid(uuid);
validateCodeVo.setImgBase64(imgBase64);
return ResponseDto.ok(validateCodeVo,code);
}

//学生登录
@RequestMapping("/login")
public ResponseDto login(String studentId, String pwd) {
if (studentService.login(studentId, pwd) != null) {
return ResponseDto.ok(studentService.login(studentId, pwd));
} else {
return ResponseDto.fail("登录失败");
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
public ResponseDto code() {
ValidateCodeUtil validateCodeUtil = new ValidateCodeUtil();
//随机生成验证码图片
String imgBase64 = validateCodeUtil.getRandomCodeImage();
//生成验证码
String code = validateCodeUtil.getCode();
//生成uuid
String uuid = UUID.randomUUID().toString();
ValidateCodeVo validateCodeVo = new ValidateCodeVo();
validateCodeVo.setUuid(uuid);
validateCodeVo.setImgBase64(imgBase64);
return ResponseDto.ok(validateCodeVo,code);
}

//学生登录
@RequestMapping("/login")
public ResponseDto login(String studentId, String pwd) {
if (studentService.login(studentId, pwd) != null) {
return ResponseDto.ok(studentService.login(studentId, pwd));
} else {
return ResponseDto.fail("登录失败");
}
}

//学生注册
@RequestMapping("/reg")
public ResponseDto reg(@RequestBody StudentPojo studentPojo){
if(studentService.select(studentPojo.getStudentId()) != null){
return ResponseDto.fail("该用户已存在");
}else {
if (studentService.reg(studentPojo) != 0){
return ResponseDto.ok("注册成功");
}else {
return ResponseDto.fail("注册失败");
}
}
}

@RequestMapping("/updatePwd")
public ResponseDto updatePwd(@RequestBody StudentPojo studentPojo){
if (studentService.updatePwd(studentPojo.getStudentId(),studentPojo.getPwd()) != null){
return ResponseDto.ok();
}else {
return ResponseDto.fail();
}
}

@RequestMapping("/show")
public ResponseDto showExams(@RequestBody ExamPojo examPojo){
return ResponseDto.ok(studentService.showExams(examPojo),studentService.countExams(examPojo));
}

@RequestMapping("/apply")
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

@RequestMapping("/showAdmissions")
public ResponseDto show(@RequestBody AdmissionVo admissionVo){
if (studentService.show(admissionVo) != null){
return ResponseDto.ok(studentService.show(admissionVo),studentService.count(admissionVo));
}else {
return ResponseDto.fail();
}
}
}


@Controller
@ResponseBody
@RequestMapping("/exam")
public class ExamController {
@Autowired
private ExamService examService;

@RequestMapping("/show")
public ResponseDto showExams(@RequestBody ExamPojo examPojo){
return ResponseDto.ok(examService.showExams(examPojo),examService.countExams(examPojo));
}

@RequestMapping("/update")
public ResponseDto update(@RequestBody ExamPojo examPojo){
int res = examService.update(examPojo);
if (res > 0){
return ResponseDto.ok();
}else {
return ResponseDto.fail("修改信息失败");
}
}

@RequestMapping("/delete")
public ResponseDto deleteExam(int examId){
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

@RequestMapping("/apply")
public ResponseDto applyExam(@RequestBody AdmissionPojo admissionPojo){
if (studentService.check(admissionPojo) == null){
if (studentService.applyExam(admissionPojo) != 0){
return ResponseDto.ok("报名成功");
}else{
return ResponseDto.fail("报名失败");
}
}else {
return ResponseDto.fail();
}
}

@RequestMapping("/delete")
public ResponseDto delete(String admissionId){
if (studentService.delete(admissionId) != 0){
return ResponseDto.ok("取消考试成功");
}else {
return ResponseDto.fail();
}
}

@RequestMapping("/showAdmissions")
public ResponseDto show(@RequestBody AdmissionVo admissionVo){
if (studentService.show(admissionVo) != null){
return ResponseDto.ok(studentService.show(admissionVo),studentService.count(admissionVo));
}else {
return ResponseDto.fail();
}
}
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

@RestController
@ResponseBody
@RequestMapping("/admission")
public class AdmissionController {
@Autowired
private AdmissionService admissionService;
@Autowired
private ExamService examService;

@RequestMapping("/show")
public ResponseDto showExams(@RequestBody AdmissionVo admissionVo){
return ResponseDto.ok(admissionService.showAdmissions(admissionVo),admissionService.countAdmissions(admissionVo));
}

@RequestMapping("/update")
public ResponseDto update(@RequestBody ExamPojo examPojo){
int res = examService.update(examPojo);
if (res > 0){
return ResponseDto.ok();
}else {
return ResponseDto.fail("修改信息失败");
}
}

@RequestMapping("/delete")
public ResponseDto deleteExam(String admissionId){
if (admissionService.delete(admissionId) > 0 ){
return ResponseDto.ok();
}else {
return ResponseDto.fail("删除失败");
}
}
}


@Controller


项目链接:
https://javayms.github.io?id=592224041303201lf
https://javayms.pages.dev?id=592224041303201lf