——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Node.js≥14
开发工具
后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可
❗没学过node.js的不要搞前后端分离项目
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明









基于javaweb的SpringBoot学生成绩管理系统(java+springboot+vue+axios+mybaits+mysql)
项目介绍
Springboot学生成绩管理系统为前后端分离的项目, 主要分为管理员、教师、学生三种角色。 管理员角色主要功能如下: 课程表:编辑、录入、查询; 成绩查询:编辑、录入、导出、查询; 成绩详情:饼状图、折线图、柱状图等; 课程录入:课程新增、编辑、删除等; 用户管理:学生、教师、管理员信息管理; 账号管理:学生、教师、管理员账号编辑、删除等;
教师主要功能如下: 课程表查看、成绩查询、成绩详情等;
学生主要功能如下: 课程表查看、成绩查询、成绩详情等
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 4.数据库:MySql 5.7/8.0版本均可; 5.是否Maven项目:是;
技术栈
后端:SpringBoot+Mybaits
前端:Vue+axios
使用说明
后端项目运行: 1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中application.yml配置文件中的数据库配置改为自己的配置; 4. 控制台提示运行成功后再运行前端项目;
前端项目运行: 1.命令行cd进入 前端目录 sms; 2.执行命令 npm install 下载依赖; 3.执行命令 npm run dev 启动; 4.运行项目,在浏览器中输入地址:http://localhost:8080/ 管理员账号、密码:root/password 教师账号、密码:3890001/159357 学生账号、密码:3168901101/123456
角色登录页面:
课程表管理页面:
主页显示页面:
成绩查询页面:
成绩详情页面:
成绩详情页面:
课程录入页面:
详情展示图页面:
用户管理-账户管理页面:
——————————CodeStart——————————
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
| teacherCourseService.add(list); }
@DeleteMapping("/{ids}") public void delete(@PathVariable("ids") Integer[] ids) { List<Integer> idsList = Arrays.asList(ids); teacherCourseService.delete(idsList); }
@PutMapping public void update(@RequestBody TeacherCourse teacherCourse) { teacherCourseService.update(teacherCourse); }
@GetMapping("/getCourseListById/{id}") public List<TeacherCourse> getCourseListById(@PathVariable("id") String id) { return teacherCourseService.getCourseListById(id); }
@GetMapping("/getProfessionInfoByTeacher/{teacherId}") public List<Map<String, Object>> getProfessionInfo(@PathVariable("teacherId") String teacherId) { return teacherCourseService.getProfessionInfo(teacherId); }
@GetMapping("/getProfessionInfoByAdmin") public List<Map<String, Object>> getProfessionInfoByAdmin() { return teacherCourseService.getProfessionInfoByAdmin(); }
@GetMapping("/getCourseInfo") public TeacherCourse getCourseInfo(@RequestParam Map<String, Object> condition) { return teacherCourseService.getCourseInfo(condition); } }
|
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
| @Bean public HandlerInterceptor appInterceptor(){ return new AuthenticationInterceptor(); } }
@RestController @RequestMapping("/api/sms/course") public class CourseController {
@Autowired private CourseService courseService;
@PostMapping public void addCourse(@RequestBody Course course) { courseService.addCourse(course); }
@DeleteMapping("/{ids}") public void delete(@PathVariable("ids") Integer[] ids) { List<Integer> idsList = Arrays.asList(ids); courseService.delete(idsList); }
@PutMapping public void update(@RequestBody Course course) { courseService.update(course); }
|
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
|
@RestController @RequestMapping("/api/sms/score") public class ScoreController {
@Autowired private ScoreService scoreService; @GetMapping("/getCourseList") public PagingResult<Course> getCourseList (@RequestParam Map<String, Object> condition, @RequestParam(required = false, name = "$limit", defaultValue = "10") Integer limit, @RequestParam(required = false, name = "$offset", defaultValue = "0") Integer offset) { RowBounds rowBounds = new RowBounds(offset, limit); return scoreService.getCourseList(rowBounds, condition); } @PostMapping private void addEntry(@RequestBody JSONArray UserScore) { List<Score> list = JSONObject.parseArray(UserScore.toJSONString(), Score.class); scoreService.addEntry(list); } @GetMapping("/export") public List<Course> getExportList (@RequestParam Map<String, Object> condition) { return scoreService.getExportList(condition); } @GetMapping("/getUserNum") public List<Map<String, Object>> getUserNum (@RequestParam Map<String, Object> condition) { return scoreService.getUserNum(condition); }
@GetMapping("/getUserTotal") public Map<String, Object> getUserTotal (@RequestParam Map<String, Object> condition) { return scoreService.getUserTotal(condition); }
|
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
| @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") .allowedOrigins("*") .allowCredentials(true) .allowedMethods("GET", "POST", "DELETE", "PUT", "PATCH", "OPTIONS") .maxAge(3600 * 24); } @Override public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(appInterceptor()) .addPathPatterns("/api/sms/**") .excludePathPatterns("/login"); WebMvcConfigurer.super.addInterceptors(registry); }
@Bean public HandlerInterceptor appInterceptor(){ return new AuthenticationInterceptor(); } }
@RestController @RequestMapping("/api/sms/course") public class CourseController {
|
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
|
@RestController @RequestMapping("/api/sms/teacher/course") public class TeacherCourseController {
@Autowired private TeacherCourseService teacherCourseService;
@PostMapping public void add(@RequestBody JSONArray teacherCourseInfo) { List<TeacherCourse> list = JSONObject.parseArray(teacherCourseInfo.toJSONString(), TeacherCourse.class); teacherCourseService.add(list); }
@DeleteMapping("/{ids}") public void delete(@PathVariable("ids") Integer[] ids) { List<Integer> idsList = Arrays.asList(ids); teacherCourseService.delete(idsList); }
@PutMapping public void update(@RequestBody TeacherCourse teacherCourse) { teacherCourseService.update(teacherCourse); }
@GetMapping("/getCourseListById/{id}") public List<TeacherCourse> getCourseListById(@PathVariable("id") String id) { return teacherCourseService.getCourseListById(id); }
@GetMapping("/getProfessionInfoByTeacher/{teacherId}") public List<Map<String, Object>> getProfessionInfo(@PathVariable("teacherId") String teacherId) { return teacherCourseService.getProfessionInfo(teacherId); }
|
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
| String imgUrl = url + newName; Path path = Paths.get(imgUrl); Files.write(path, bytes);
String userId = request.getParameter("id"); int level = parseInt(request.getParameter("level")); Upload upload = new Upload(); upload.setUserId(userId); upload.setLevel(level); upload.setUrl(imgUrl); uploadService.upload(upload);
return imgUrl.substring(imgUrl.indexOf("/")); } catch (IOException e) { e.printStackTrace(); } } return ""; }
@GetMapping("/getHeadImg") @UserLoginToken public String getAdminList (@RequestParam Map<String, Object> condition, HttpServletRequest httpServletRequest) { return uploadService.getHeader(condition); } }
@RestController @UserLoginToken
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=061524180701201hp
https://javayms.pages.dev?id=061524180701201hp