基于javaweb的SpringBoot田径运动会管理系统(java+springboot+thymeleaf+html+maven+mysql)

运行环境

Java≥8、MySQL≥5.7

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

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

功能说明

510023062402

520023062402

530023062402

540023062402

550023062402

560023062402

基于javaweb的SpringBoot田径运动会管理系统(java+springboot+thymeleaf+html+maven+mysql)

项目介绍

本项目分为管理员、学生两种角色, 管理员主要功能包括: 功能:登录、查看个人资料、修改密码、选手管理、赛事管理、报名管理、成绩管理、开幕式管理、闭幕式管理 学生主要功能包括: 首页, 项目管理:报名项目、查看已报名项目; 成绩查询:单个项目查询、总成绩查询、个人总积分查询; 查看开幕式; 查看闭幕式; 个人资料:查看个人资料、修改密码;

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
4.数据库:MySql 8.0版本;
5.是否Maven项目:是;

技术栈

  1. 后端:SpringBoot

  2. 前端:Thymeleaf+HTML+CSS+jQuery

使用说明
运行项目,输入localhost:8080/
管理员账号/密码:10001/123456
学生账号/密码:1001/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
44
45
46
47
48
        model.addAttribute("referee",referee);
return "admin/sports-add";
}
//添加运动项目
@RequestMapping("/admin/addSports")
@ResponseBody
public Msg addStu(Sports sports) {
//System.out.println(sports);
sportsService.addSports(sports);
return Msg.success();
}

//去运动项目修改页面
@RequestMapping("/admin/toUpdSports/{sportsId}")
public String toUpdSports(@PathVariable("sportsId")Integer sportsId , Model model) {
Sports sports = sportsService.querySportsById(sportsId);
model.addAttribute("sports",sports);

List referee = refereeService.queryReferee();
model.addAttribute("referee",referee);

return "admin/sports-update";
}

//修改运动项目
@RequestMapping("/admin/updSports")
@ResponseBody
public Msg updSports(Sports sports, Model model) {
//System.out.println(sports);
sportsService.updSports(sports);
return Msg.success().add("msg","修改成功!");
}

//删除运动项目
@RequestMapping(value = "/admin/toDelSports/{sportsId}",method = RequestMethod.DELETE)
@ResponseBody
public Msg toDelSports(@PathVariable("sportsId") String sportsId){
int sportsId2=Integer.parseInt(sportsId);
sportsService.delSportsById(sportsId2);
return Msg.success().add("msg","删除成功!");
}



// 根据类型查询运动项目
// @RequestMapping(value = "/admin/querySportsByType",method = RequestMethod.GET)
// @ResponseBody
// public Msg querySportsByType(@RequestParam("sportsType") String sportsType,
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



@Controller
public class StudentController {

@Autowired
private StudentService studentService;

// @RequestMapping("/admin/getStu")
public String getStu(Model model){
Collection<Student> list = studentService.queryStu();
model.addAttribute("students",list);
return "admin/student-list";
}

//分页显示学生
@RequestMapping("/admin/getStu/{pn}")
public String getStuWithJson(@PathVariable(value = "pn") Integer pn,Model model){
//这不是分页查询
//引入PageHelper分页插件
//在查询之前只需要调用,传入页码,以及每页的大小
PageHelper.startPage(pn,5);
//startPage后面紧跟的这个查询就是一个分页查询
List<Student> students=studentService.queryStu();
List schooltype = studentService.querySchool();
// System.out.println(school);
model.addAttribute("schooltype",schooltype);
//使用PageInfo包装查询后的结果,只需要将page交给页面就行了
//封装了详细的分页信息,包括我们查询出来的数据,传入连续显示的页数
PageInfo page=new PageInfo(students,5);
//System.out.println(page);
model.addAttribute("pageInfo",page);
model.addAttribute("sign","getStu");
return "admin/student-list";
}

Integer id;
String gender;
String school;
//分页显示学生----带条件
@RequestMapping("/admin/queryStuWithCondition/{pn}")
public String queryStuWithCondition(@RequestParam(value = "school",required = false)String school,
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
        return Msg.success().add("msg","修改成功!请重新登录");
}

}
package com.xhu.controller;




@Controller
public class StudentController {

@Autowired
private StudentService studentService;

// @RequestMapping("/admin/getStu")
public String getStu(Model model){
Collection<Student> list = studentService.queryStu();
model.addAttribute("students",list);
return "admin/student-list";
}

//分页显示学生
@RequestMapping("/admin/getStu/{pn}")
public String getStuWithJson(@PathVariable(value = "pn") Integer pn,Model model){
//这不是分页查询
//引入PageHelper分页插件
//在查询之前只需要调用,传入页码,以及每页的大小
PageHelper.startPage(pn,5);
//startPage后面紧跟的这个查询就是一个分页查询
List<Student> students=studentService.queryStu();
List schooltype = studentService.querySchool();
// System.out.println(school);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
        PageInfo page=new PageInfo(score,5);
model.addAttribute("pageInfo",page);
model.addAttribute("sign","querySportsWithCondition");
return "admin/scoreAllBySchool";

}
}
package com.xhu.controller;




@Controller
public class GradeController {

@Autowired
GradeService gradeService;
@Autowired
SportsService sportsService;
@Autowired
StudentService studentService;

//去显示成绩页面
@RequestMapping("/admin/toGetScore")
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
    @RequestMapping("/admin/toUpdAdminPass/{adminId}")
public String toUpdAdminPass(@PathVariable("adminId")Integer adminId,Model model){
//System.out.println(adminId);
model.addAttribute("adminId",adminId);
return "admin/admin-pass-upd";
}

//修改管理员密码
@RequestMapping("/admin/updAdminPass")
@ResponseBody
public Msg updAdminPass( @RequestParam("adminId")Integer adminId,
@RequestParam("adminPassword")String adminPassword,
@RequestParam("adminPassword2")String adminPassword2){
// System.out.println(adminId+"--"+adminPassword+"--"+adminPassword2);
adminService.updAdminPass(adminPassword,adminId);
return Msg.success().add("msg","修改成功!请重新登录");
}


}
package com.xhu.controller;




@Controller
public class StuSportsController {

@Autowired
private SportsService sportsService;
@Autowired
private RefereeService refereeService;
@Autowired
private StudentService studentService;
@Autowired
GradeService gradeService;
@Autowired
CeremonyService ceremonyService;


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