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





基于javaweb的SpringBoot成绩管理系统(前后端分离+java+vue+springboot+ssm+mysql+maven)
一、项目简述
本系统功能包括: 超豪华成绩管理系统,学生,教师,管理员三类用户集 成,课程表管理,成绩查询,成绩详情数据统计,课程录 入,用户管理,账号管理。
二、项目运行
环境配置: Jdk1.8 + Mysql + HBuilderX (Webstorm也 行)+ Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts都支 持)。
项目技术: Springboot + Maven + Mybatis + Vue等等组成, B/S模式+ Maven等等。
——————————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 36
| 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); } } package com.zjh.sms.controller.Score;
|
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
|
@RestController @RequestMapping("/api/sms/user/admin") public class AdminController { @Autowired private AdminService adminService;
@PostMapping public void addAdmin(@RequestBody User user) { adminService.add(user); }
@DeleteMapping("/{ids}") public void delete(@PathVariable("ids") Integer[] ids) { List<Integer> idsList = Arrays.asList(ids); adminService.delete(idsList); }
@PutMapping public void update(@RequestBody User user) { adminService.update(user); }
@GetMapping("/getAdminList") public PagingResult<User> getAdminList (@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 adminService.getAdminList(rowBounds, condition); }
} package com.zjh.sms.controller.Profession;
|
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
| **/ @RestController @RequestMapping("/api/sms/timetable") public class TimetableController { @Autowired private TimetableService timetableService;
@PostMapping public void add(@RequestBody JSONArray WeekCourseList) { List<WeekCourse> list = JSONObject.parseArray(WeekCourseList.toJSONString(), WeekCourse.class); timetableService.add(list); }
@GetMapping("/getTimetable") public List<WeekCourse> getStudentList (@RequestParam Map<String, Object> condition) { return timetableService.getTimetable(condition); }
@GetMapping("/getTimetableByStudent") public List<WeekCourse> getTimetableByStudent (@RequestParam Map<String, Object> condition) { return timetableService.getTimetableByStudent(condition); } @GetMapping("/getTimetableByTeacher") public List<WeekCourse> getTimetableByTeacher (@RequestParam Map<String, Object> condition) { return timetableService.getTimetableByTeacher(condition); } @PostMapping("/updateCourseInfo") public void updateCourseInfo(@RequestBody CourseInfo courseInfo) { timetableService.updateCourseInfo(courseInfo); }
} package com.zjh.sms.controller.User;
|
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
| if (token == null) { throw new RuntimeException("=== 无token,请重新登录 ==="); } JWTVerifier jwtVerifier = JWT.require(Algorithm.HMAC256(user.getPassword())).build(); try { jwtVerifier.verify(token); } catch (JWTVerificationException e) { logger.error("=== token验证失败 ==="); httpServletResponse.sendError(401); return false;
}
return true; }
@Override public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception {
}
@Override public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception { } } package com.zjh.sms.controller.Upload;
|
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
|
@RestController @RequestMapping("/api/sms/upload") public class UploadController { @Autowired private UploadService uploadService;
@PostMapping("/headImg") @ResponseBody public String upload(MultipartFile file, HttpServletRequest request) throws IOException { if (!file.isEmpty()) { try { byte[] bytes = file.getBytes(); String url = "sms/static/img/"; String ImgName = file.getOriginalFilename();
String uid = UUID.randomUUID().toString(); assert ImgName != null; String str = ImgName.substring(ImgName.lastIndexOf(".")); String newName = uid + str;
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);
|
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
| public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(appInterceptor()) .addPathPatterns("/api/sms/**") .excludePathPatterns("/login"); WebMvcConfigurer.super.addInterceptors(registry); }
@Bean public HandlerInterceptor appInterceptor(){ return new AuthenticationInterceptor(); } } package com.zjh.sms.controller.Course;
@RestController @RequestMapping("/api/sms/course") public class CourseController {
@Autowired private CourseService courseService;
@PostMapping public void addCourse(@RequestBody Course course) {
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=121222062008200wl
https://javayms.pages.dev?id=121222062008200wl