基于SSM的教务管理系统

浏览 14 次

Educational Administration Management System Based on SSM

基于SSM框架开发的教务管理系统,旨在实现高校教务信息的高效管理。系统核心功能包括学生信息管理、课程安排、成绩录入与查询、教师管理等模块。该系统开发采用Spring、SpringMVC和MyBatis技术栈,结构清晰,易于维护,适合作为毕业设计或实际项目实现,为学校教务工作提供便捷的信息管理解决方案。

SSMMySQL权限控制多角色系统后台管理PC端

项目简介

基于SSM框架开发的教务管理系统,旨在实现高校教务信息的高效管理。系统核心功能包括学生信息管理、课程安排、成绩录入与查询、教师管理等模块。该系统开发采用Spring、SpringMVC和MyBatis技术栈,结构清晰,易于维护,适合作为毕业设计或实际项目实现,为学校教务工作提供便捷的信息管理解决方案。

项目基础信息

适合专业计算机科学与技术 / 软件工程 / 信息管理
技术栈SSM (Spring + Spring MVC + MyBatis) + MySQL + Bootstrap
系统架构MVC分层架构
项目类型管理系统 / Web应用
运行环境JDK1.8、Tomcat8+、MySQL5.7+
开发工具IntelliJ IDEA / Eclipse、Maven、Git

项目包含内容

  • 前后端完整源码
  • 数据库完整脚本
  • 参考论文(如有)
  • 部署软件及部署说明
  • 项目介绍文档(如有)

项目详细介绍

ssm-教务系统

介绍

采用了spring mvc,spring,mybatis框架,前端用到js,html,主要功能包括:课程管理,学生管理,教师管理,账号密码重置等功能

安装教程

  1. 把项目放到idea

  2. 注意把连接的数据库信息修改成自己的

  3. 配置tomcat

  4. 导入依赖,如果有的爆红导不进去可以选择换个maven版本试试


package com.system.controller;



import com.system.exception.CustomException;

import com.system.po.*;

import com.system.service.*;

import org.springframework.stereotype.Controller;

import org.springframework.ui.Model;

import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;



import javax.annotation.Resource;

import java.util.List;





@Controller

@RequestMapping(/admin)

public class AdminController {



    @Resource

    private StudentService studentService;



    @Resource

    private TeacherService teacherService;



    @Resource

    private CourseService courseService;



    @Resource

    private CollegeService collegeService;



    @Resource

    private UserloginService userloginService;



    /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<学生操作>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/



    //  学生信息显示

    @RequestMapping(/showStudent)

    public String showStudent(Model model, Integer page) throws Exception {



        List<StudentCustom> list = null;

        //页码对象

        PagingVO pagingVO = new PagingVO();

        //设置总页数

        pagingVO.setTotalCount(studentService.getCountStudent());

        if (page == null || page == 0) {

            pagingVO.setToPageNo(1);

            list = studentService.findByPaging(1);

        } else {

            pagingVO.setToPageNo(page);

            list = studentService.findByPaging(page);

        }



        model.addAttribute(studentList, list);

        model.addAttribute(pagingVO, pagingVO);



        return admin/showStudent;



    }



    //  添加学生信息页面显示

    @RequestMapping(value = /addStudent, method = {RequestMethod.GET})

    public String addStudentUI(Model model) throws Exception {



        List<College> list = collegeService.finAll();



        model.addAttribute(collegeList, list);



        return admin/addStudent;

    }



     // 添加学生信息操作

    @RequestMapping(value = /addStudent, method = {RequestMethod.POST})

    public String addStudent(StudentCustom studentCustom, Model model) throws Exception {



        Boolean result = studentService.save(studentCustom);



        if (!result) {

            model.addAttribute(message, 学号重复);

            return error;

        }

        //添加成功后,也添加到登录表

        Userlogin userlogin = new Userlogin();

        userlogin.setUsername(studentCustom.getUserid().toString());

        userlogin.setPassword(123);

        userlogin.setRole(2);

        userloginService.save(userlogin);



        //重定向

        return redirect:/admin/showStudent;

    }



    // 修改学生信息页面显示

    @RequestMapping(value = /editStudent, method = {RequestMethod.GET})

    public String editStudentUI(Integer id, Model model) throws Exception {

        if (id == null) {

            //加入没有带学生id就进来的话就返回学生显示页面

            return redirect:/admin/showStudent;

        }

        StudentCustom studentCustom = studentService.findById(id);

        if (studentCustom == null) {

            throw new CustomException(未找到该名学生);

        }

        List<College> list = collegeService.finAll();



        model.addAttribute(collegeList, list);

        model.addAttribute(student, studentCustom);





        return admin/editStudent;

    }



    // 修改学生信息处理

    @RequestMapping(value = /editStudent, method = {RequestMethod.POST})

    public String editStudent(StudentCustom studentCustom) throws Exception {



        studentService.updataById(studentCustom.getUserid(), studentCustom);



        //重定向

        return redirect:/admin/showStudent;

    }



    // 删除学生

    @RequestMapping(value = /removeStudent, method = {RequestMethod.GET} )

    private String removeStudent(Integer id) throws Exception {

        if (id == null) {

            //加入没有带学生id就进来的话就返回学生显示页面

            return admin/showStudent;

        }

        studentService.removeById(id);

        userloginService.removeByName(id.toString());



        return redirect:/admin/showStudent;

    }



    // 搜索学生

    @RequestMapping(value = selectStudent, method = {RequestMethod.POST})

    private String selectStudent(String findByName, Model model) throws Exception {



        List<StudentCustom> list = studentService.findByName(findByName);



        model.addAttribute(studentList, list);

        return admin/showStudent;

    }



    /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<教师操作>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/



    // 教师页面显示

    @RequestMapping(/showTeacher)

    public String showTeacher(Model model, Integer page) throws Exception {



        List<TeacherCustom> list = null;

        //页码对象

        PagingVO pagingVO = new PagingVO();

        //设置总页数

        pagingVO.setTotalCount(teacherService.getCountTeacher());

        if (page == null || page == 0) {

            pagingVO.setToPageNo(1);

            list = teacherService.findByPaging(1);

        } else {

            pagingVO.setToPageNo(page);

            list = teacherService.findByPaging(page);

        }



        model.addAttribute(teacherList, list);

        model.addAttribute(pagingVO, pagingVO);



        return admin/showTeacher;



    }



    // 添加教师信息

    @RequestMapping(value = /addTeacher, method = {RequestMethod.GET})

    public String addTeacherUI(Model model) throws Exception {



        List<College> list = collegeService.finAll();



        model.addAttribute(collegeList, list);



        return admin/addTeacher;

    }



    // 添加教师信息处理

    @RequestMapping(value = /addTeacher, method = {RequestMethod.POST})

    public String addTeacher(TeacherCustom teacherCustom, Model model) throws Exception {



        Boolean result = teacherService.save(teacherCustom);



        if (!result) {

            model.addAttribute(message, 工号重复);

            return error;

        }

        //添加成功后,也添加到登录表

        Userlogin userlogin = new Userlogin();

        userlogin.setUsername(teacherCustom.getUserid().toString());

        userlogin.setPassword(123);

        userlogin.setRole(1);

        userloginService.save(userlogin);



        //重定向

        return redirect:/admin/showTeacher;

    }



    // 修改教师信息页面显示

    @RequestMapping(value = /editTeacher, method = {RequestMethod.GET})

    public String editTeacherUI(Integer id, Model model) throws Exception {

        if (id == null) {

            return redirect:/admin/showTeacher;

        }

        TeacherCustom teacherCustom = teacherService.findById(id);

        if (teacherCustom == null) {

            throw new CustomException(未找到该名学生);

        }

        List<College> list = collegeService.finAll();



        model.addAttribute(collegeList, list);

        model.addAttribute(teacher, teacherCustom);





        return admin/editTeacher;

    }



    // 修改教师信息页面处理

    @RequestMapping(value = /editTeacher, method = {RequestMethod.POST})

    public String editTeacher(TeacherCustom teacherCustom) throws Exception {



        teacherService.updateById(teacherCustom.getUserid(), teacherCustom);



        //重定向

        return redirect:/admin/showTeacher;

    }



    //删除教师

    @RequestMapping(/removeTeacher)

    public String removeTeacher(Integer id) throws Exception {

        if (id == null) {

            //加入没有带教师id就进来的话就返回教师显示页面

            return admin/showTeacher;

        }

        teacherService.removeById(id);

        userloginService.removeByName(id.toString());



        return redirect:/admin/showTeacher;

    }



    //搜索教师

    @RequestMapping(value = selectTeacher, method = {RequestMethod.POST})

    private String selectTeacher(String findByName, Model model) throws Exception {



        List<TeacherCustom> list = teacherService.findByName(findByName);



        model.addAttribute(teacherList, list);

        return admin/showTeacher;

    }



    /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<课程操作>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/



    // 课程信息显示

    @RequestMapping(/showCourse)

    public String showCourse(Model model, Integer page) throws Exception {



        List<CourseCustom> list = null;

        //页码对象

        PagingVO pagingVO = new PagingVO();

        //设置总页数

        pagingVO.setTotalCount(courseService.getCountCouse());

        if (page == null || page == 0) {

            pagingVO.setToPageNo(1);

            list = courseService.findByPaging(1);

        } else {

            pagingVO.setToPageNo(page);

            list = courseService.findByPaging(page);

        }



        model.addAttribute(courseList, list);

        model.addAttribute(pagingVO, pagingVO);



        return admin/showCourse;



    }



    //添加课程

    @RequestMapping(value = /addCourse, method = {RequestMethod.GET})

    public String addCourseUI(Model model) throws Exception {



        List<TeacherCustom> list = teacherService.findAll();

        List<College> collegeList = collegeService.finAll();



        model.addAttribute(collegeList, collegeList);

        model.addAttribute(teacherList, list);



        return admin/addCourse;

    }



    // 添加课程信息处理

    @RequestMapping(value = /addCourse, method = {RequestMethod.POST})

    public String addCourse(CourseCustom courseCustom, Model model) throws Exception {



        Boolean result = courseService.save(courseCustom);



        if (!result) {

            model.addAttribute(message, 课程号重复);

            return error;

        }





        //重定向

        return redirect:/admin/showCourse;

    }



    // 修改教师信息页面显示

    @RequestMapping(value = /editCourse, method = {RequestMethod.GET})

    public String editCourseUI(Integer id, Model model) throws Exception {

        if (id == null) {

            return redirect:/admin/showCourse;

        }

        CourseCustom courseCustom = courseService.findById(id);

        if (courseCustom == null) {

            throw new CustomException(未找到该课程);

        }

        List<TeacherCustom> list = teacherService.findAll();

        List<College> collegeList = collegeService.finAll();



        model.addAttribute(teacherList, list);

        model.addAttribute(collegeList, collegeList);

        model.addAttribute(course, courseCustom);





        return admin/editCourse;

    }



    // 修改教师信息页面处理

    @RequestMapping(value = /editCourse, method = {RequestMethod.POST})

    public String editCourse(CourseCustom courseCustom) throws Exception {



        courseService.upadteById(courseCustom.getCourseid(), courseCustom);



        //重定向

        return redirect:/admin/showCourse;

    }



    // 删除课程信息

    @RequestMapping(/removeCourse)

    public String removeCourse(Integer id) throws Exception {

        if (id == null) {

            //加入没有带教师id就进来的话就返回教师显示页面

            return admin/showCourse;

        }

        courseService.removeById(id);



        return redirect:/admin/showCourse;

    }



    //搜索课程

    @RequestMapping(value = selectCourse, method = {RequestMethod.POST})

    private String selectCourse(String findByName, Model model) throws Exception {



        List<CourseCustom> list = courseService.findByName(findByName);



        model.addAttribute(courseList, list);

        return admin/showCourse;

    }



    /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<其他操作>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/



    // 普通用户账号密码重置

    @RequestMapping(/userPasswordRest)

    public String userPasswordRestUI() throws Exception {

        return admin/userPasswordRest;

    }



    // 普通用户账号密码重置处理

    @RequestMapping(value = /userPasswordRest, method = {RequestMethod.POST})

    public String userPasswordRest(Userlogin userlogin) throws Exception {



        Userlogin u = userloginService.findByName(userlogin.getUsername());



        if (u != null) {

            if (u.getRole() == 0) {

                throw new CustomException(该账户为管理员账户,没法修改);

            }

            u.setPassword(userlogin.getPassword());

            userloginService.updateByName(userlogin.getUsername(), u);

        } else {

            throw new CustomException(没找到该用户);

        }



        return admin/userPasswordRest;

    }



    // 本账户密码重置

    @RequestMapping(/passwordRest)

    public String passwordRestUI() throws Exception {

        return admin/passwordRest;

    }





}

联系咨询区

可沟通项目方向、预算、交付周期与答辩时间安排,支持按学校要求定制交付内容。

为你推荐

根据你的浏览兴趣与热门趋势,精选可能适合你的毕业设计项目。

基于JAVA+SpringBoot+Vue+uniapp的微信小程序点餐平台

SpringBootVue微信小程序UniAppMySQL前后端分离支付功能小程序端

该系统是一个基于Java+SpringBoot后端、Vue+Uniapp前端的微信小程序点餐平台。平台实现了在线菜单浏览、购物车管理、订单提交与支付、后台数据统计等核心功能,为餐饮商家提供高效便捷的数字化点餐解决方案。项目采用前后端分离架构,适合作为毕业设计或实际项目开发,展示了现代Web与移动应用系统的完整实现流程。

基于JAVA+SpringBoot+Vue+uniapp+协同过滤算法+爬虫+AI的减肥小程序

SpringBootVueUniAppAI智能推荐算法小程序端

该项目是一个集成了协同过滤推荐算法、网络爬虫与AI技术的智能减肥小程序。系统采用JAVA+SpringBoot构建后端服务,Vue+uniapp实现跨平台前端,旨在为用户提供个性化的饮食与运动方案。核心功能包括基于用户行为的智能推荐、健康数据管理及社区互动,适合作为毕业设计或实际项目开发,展示了现代Web与移动应用在信息管理与系统开发中的综合实践。

基于JAVA+SpringBoot+Vue的自动阅卷分析系统

SpringBootVueMySQLAI智能数据可视化前后端分离PC端

该系统是一个基于JAVA+SpringBoot后端与Vue前端的自动阅卷分析系统,旨在实现高效、准确的试卷批改与学习数据分析。核心功能包括智能识别与评分、错题统计分析、成绩报告生成以及教学效果评估。该系统开发专注于提升阅卷效率与信息管理深度,适用于在线教育、考试机构及毕业设计项目实现,为教学管理与学习分析提供一体化解决方案。

基于JAVA+SpringBoot+Vue+uniApp小程序的心理健康测试平台

SpringBootVue微信小程序UniAppMySQL前后端分离小程序端

该心理健康测试平台是一个集前端小程序与后端管理系统于一体的综合系统开发项目。平台采用JAVA与SpringBoot构建稳健后端,结合Vue与uniApp实现跨端小程序开发,为用户提供便捷的心理测评与报告服务。系统核心功能包括题库管理、在线测试、数据分析及报告生成,旨在通过信息化手段提升心理健康服务的可及性与专业性,适用于毕业设计或实际项目实现。

基于JAVA+SpringBoot+Vue+uniapp的前后端分离的微信小程序的艺术品陶瓷商城

SpringBootVue微信小程序UniAppMySQL前后端分离小程序端

该项目是一个基于JAVA+SpringBoot+Vue+uniapp技术栈的前后端分离微信小程序艺术品陶瓷商城系统。系统开发实现了艺术品陶瓷的在线展示、商品管理、用户订单处理及支付集成等核心功能,为陶瓷艺术品的数字化交易提供了完整的信息管理解决方案,适合作为毕业设计或商业项目实现。

基于JAVA+SpringBoot+Vue的二手车交易系统

SpringBootVueMySQL前后端分离PC端

该系统是一个基于Java+SpringBoot+Vue的二手车交易管理系统,旨在为用户提供便捷的在线车辆买卖平台。核心功能包括车辆信息发布、智能搜索、在线咨询、交易管理及用户评价等模块。通过前后端分离的系统开发模式,实现了高效的信息管理和流畅的用户体验,适合作为毕业设计或实际项目实现,帮助提升二手车交易效率与透明度。

基于JAVA+SpringBoot+Vue的故障报修平台

SpringBootVueMySQL前后端分离PC端

该项目是一个基于Java、SpringBoot和Vue的故障报修平台,旨在实现高效的设备故障管理与维修流程。系统提供用户在线报修、工单分配、进度跟踪及数据统计等核心功能,适用于企业或校园的日常运维。通过前后端分离架构,确保了系统的可扩展性和维护性,适合作为毕业设计或实际项目实现,展示了现代Web信息管理系统的开发实践。

基于JAVA+SpringBoot+Vue的前后端分离的学校请假管理系统

SpringBootVueMySQL权限控制多角色系统前后端分离PC端

这是一个基于JAVA+SpringBoot+Vue的前后端分离学校请假管理系统,旨在实现学生请假流程的数字化与高效管理。系统开发涵盖了学生在线提交申请、辅导员与院系审批、请假记录统计等核心功能,优化了传统纸质流程。该项目可作为信息管理系统的毕业设计或实际应用案例,展示了前后端分离架构在项目实现中的优势。