当前位置:   article > 正文

springboot基于javaEE 学生成绩管理系统

springboot基于javaEE 学生成绩管理系统

一、项目介绍

  在系统设计阶段,本文首先进行了详细的需求分析,明确了系统的功能需求和非功能需求。然后,本文设计了系统的整体架构,包括数据库设计、界面设计以及系统流程设计。在系统实现阶段,本文采用了面向对象的编程思想,利用Java语言进行系统的开发。本文实现了用户登录、学生信息管理、课程信息管理、成绩录入、成绩查询等多个功能模块。其中,用户登录模块保证了系统的安全性;学生信息管理模块和课程信息管理模块实现了对学生和课程信息的增删改查功能;成绩录入模块和成绩查询模块则实现了对学生成绩的录入和查询功能。此外,本文还利用网络技术,实现了系统的远程访问和数据共享,方便用户随时随地进行成绩管理。
通过对学生成绩管理系统的设计与实现,本文成功构建了一个功能完善、操作简便、安全可靠的学生成绩管理系统。该系统的应用将大大提高学校成绩管理的效率和质量,为教学管理工作提供有力的支持。
关键词;学生成绩管理系统;管理系统;B/S模式;软件架构

二、开发环境

开发语言:Java
框架:springboot
JDK版本:JDK1.8
服务器:tomcat7
数据库:mysql
数据库工具:Navicat11
开发软件:eclipse/myeclipse/idea
Maven包:Maven
————————————————

三、功能介绍

本系统设计时,确定详细功能,这些功能主要通过需求阶段的调研分析得来的,具体功能模块如下图,如图4-2,4-3所示。

请添加图片描述

图4-2 学生成绩管理系统管理员功能结构设计
请添加图片描述

图4-3学生成绩管理系统用户功能结构设计

四、核心代码

部分代码:

package com.example.controller;

import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.SecureUtil;
import com.example.common.Result;
import com.example.common.ResultCode;
import com.example.entity.Caiwu;
import com.example.exception.CustomException;
import com.example.service.CaiwuService;
import com.example.utils.MapWrapperUtils;
import com.example.utils.jwt.JwtUtil;
import com.example.vo.CaiwuVo;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping(value = "/caiwu")
public class CaiwuController {

    @Resource
    private CaiwuService caiwuService;

    @PostMapping
    public Result<Caiwu> add(@RequestBody CaiwuVo caiwu) {
        caiwuService.add(caiwu);
           return Result.success(caiwu);
    }
	
	

    @PostMapping("/deleteList")
    public Result<Caiwu> deleteList(@RequestBody CaiwuVo caiwu) {
        caiwuService.deleteList(caiwu.getList());
        return Result.success();
    }

    @DeleteMapping("/{id}")
    public Result delete(@PathVariable Long id) {
        caiwuService.delete(id);
        return Result.success();
    }

    @PutMapping
    public Result update(@RequestBody CaiwuVo caiwu) {
        caiwuService.update(caiwu);
        return Result.success();
    }

    @GetMapping("/{id}")
    public Result<Caiwu> detail(@PathVariable Integer id) {
        Caiwu caiwu = caiwuService.findById(id);
        return Result.success(caiwu);
    }

    @GetMapping
    public Result<List<Caiwu>> all() {
        return Result.success(caiwuService.list());
    }

    @PostMapping("/page")
    public Result<CaiwuVo> page(@RequestBody CaiwuVo caiwuVo) {
        return Result.success(caiwuService.findPage(caiwuVo));
    }
	    @PostMapping("/login")
    public Result login(@RequestBody Caiwu caiwu, HttpServletRequest request) {
        if (StrUtil.isBlank(caiwu.getZhanghao()) || StrUtil.isBlank(caiwu.getMima())) {
            throw new CustomException(ResultCode.PARAM_LOST_ERROR);
        }
        Caiwu login = caiwuService.login(caiwu);
//        if(!login.getStatus()){
//            return Result.error("1001","状态限制,无法登录系统");
//        }
        if(login != null) {
            HashMap hashMap = new HashMap();
            hashMap.put("user", login);
            Map<String, Object> map = MapWrapperUtils.builder(MapWrapperUtils.KEY_USER_ID,caiwu.getId());
            String token = JwtUtil.creatToken(map);
            hashMap.put("token", token);
            return Result.success(hashMap);
        }else {
            return Result.error();
        }
    }
    @PutMapping("/updatePassword")
    public Result updatePassword(@RequestBody Caiwu info, HttpServletRequest request) {
        Caiwu caiwu = caiwuService.findById(info.getId());
        String oldPassword = SecureUtil.md5(info.getMima());
        if (!oldPassword.equals(caiwu.getMima())) {
            return Result.error(ResultCode.PARAM_PASSWORD_ERROR.code, ResultCode.PARAM_PASSWORD_ERROR.msg);
        }
        info.setMima(SecureUtil.md5(info.getNewPassword()));
        Caiwu caiwu1 = new Caiwu();
        BeanUtils.copyProperties(info, caiwu1);
        caiwuService.update(caiwu1);
        return Result.success();
    }
}

  • 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
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104

五、效果图

请添加图片描述

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

六、文章目录

目 录

摘 要 I
Abstract II
第1章 绪论 4
1.1 学生研究的背景 4
1.2开发目的和意义 4
1.3国内外研究现状 5
第2章 系统开发工具 7
2.1 Java编程语言 7
2.2 B/S模式 8
2.3 MySQL数据库 8
2.4 SpringBoot框架介绍 8
2.5HTML技术 9
2.6 软件工程概述 9
第3章 系统分析 11
3.1 概述 11
3.2 功能需求 11
3.3 非功能性需求 13
3.4 系统特色 14
3.5 可行性研究 14
第4章 系统总体设计 15
4.1 系统架构设计 15
4.2 系统数据库设计 17
第5章 系统功能实现 28
5.1登录模块的实现 28
5.2管理员管理模块 28
5.3教师管理模块 29
5.4部门管理模块 29
5.5班级专业管理模块 30
5.6学生信息管理模块 30
第6章 系统测试 32
6.1 测试定义 32
6.2 测试目的 32
6.3 测试方案 32
6.3 测试方案 34
6.4 系统分析 35
第7章 总结 37
参考文献 38
致谢 40

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号