• 免费分享一个springboot+vue学生选课管理系统,挺漂亮的


    大家好,我是锋哥,看到一个不错的springboot+vue前后端分离的学生选课管理系统,分享下哈。

    项目介绍

    这是一个采用前后端分离开发的项目,前端采用 Vue 开发、后端采用 SpringBoot + Mybatis 开发。

    项目部署

    1. 将 studentms.sql 导入mysql数据库

    2. 运行前端webstorm导入student_client运行 

    3. 运行后端idea导入student_server

    项目展示

    1、登陆界面

    2、admin 主界面

    3、动态搜索框与表格展示

    4、学生端首页展示

    5、教师端成绩搜索与编辑

    前端部分

    1、项目运行

    由于涉及大量的 ES6/7 等新属性,node 需要 6.0 以上版本

    2、技术栈

    • Vuex

    • Router

    • Axios

    • Element ui

    • sessionStorage

    3、项目介绍

    采用 vue 2.0 开发,通过调用后端提供的数据接口实现数据的动态渲染。项目默认端口号 8080

    • 使用监视器,得益于 Mybatis 强大的动态 SQL 功能,实现高性能动态搜索功能

    • 使用 router 配置路由,实现不同用户类型导航栏的动态渲染

    • 使用 axios 异步加载后端数据

    • 使用 element ui 实现表单的前端校验功能

    • 使用 sessionStorage 实现登录拦截

    • 分别实现了基于前端和后端的数据分页功能

    4、系统功能

    1、admin

    • 实现对教师,学生,课程的 CRUD

    • 实现对教师业务以及学生业务的全方位控制

    2、teacher

    • 实现查询我开设的课程,以及选择我课程的学生信息

    • 对学生成绩的登陆

    3、student

    • 实现选课退课的功能

    • 实现成绩查询的功能

    后端部分

    1、项目运行

    JDK 版本需要 1.8或者以上

    2、技术栈

    • Spring boot 2.6.3

    • Mybatis

    • Maven

    3、项目介绍

    采用 Restful 风格开发,采用 CrossOrigin 解决跨域问题。采用注解以及 xml 文件配置 SQL 语句,实现动态 SQL 的功能,为前端提供完备的数据接口。

    由于 vue 项目占用了 8080 Tomcat 默认端口,所以指定项目启动在 10086 端口, 可以使用 YAML 文件配置,使用 Maven 项目进行打包。

    4、系统功能

    实现前端 Ajax 请求的全部数据接口,Get 请求通过 RESTful 风格开发。

    数据库设计

    部分代码

    1. @RestController
    2. @CrossOrigin("*")
    3. @RequestMapping("/student")
    4. public class StudentController {
    5. @Autowired
    6. private StudentService studentService;
    7. @PostMapping("/addStudent")
    8. public boolean addStudent(@RequestBody Student student) {
    9. System.out.println("正在保存学生对象" + student);
    10. return studentService.save(student);
    11. }
    12. @PostMapping("/login")
    13. public boolean login(@RequestBody Student student) {
    14. System.out.println("正在验证学生登陆 " + student);
    15. Student s = studentService.findById(student.getSid());
    16. if (s == null || !s.getPassword().equals(student.getPassword())) {
    17. return false;
    18. }
    19. else {
    20. return true;
    21. }
    22. }
    23. @PostMapping("/findBySearch")
    24. public List findBySearch(@RequestBody Student student) {
    25. Integer fuzzy = (student.getPassword() == null) ? 0 : 1;
    26. return studentService.findBySearch(student.getSid(), student.getSname(), fuzzy);
    27. }
    28. @GetMapping("/findById/{sid}")
    29. public Student findById(@PathVariable("sid") Integer sid) {
    30. System.out.println("正在查询学生信息 By id " + sid);
    31. return studentService.findById(sid);
    32. }
    33. @GetMapping("/findByPage/{page}/{size}")
    34. public List findByPage(@PathVariable("page") int page, @PathVariable("size") int size) {
    35. System.out.println("查询学生列表分页 " + page + " " + size);
    36. return studentService.findByPage(page, size);
    37. }
    38. @GetMapping("/getLength")
    39. public Integer getLength() {
    40. return studentService.getLength();
    41. }
    42. @GetMapping("/deleteById/{sid}")
    43. public boolean deleteById(@PathVariable("sid") int sid) {
    44. System.out.println("正在删除学生 sid:" + sid);
    45. return studentService.deleteById(sid);
    46. }
    47. @PostMapping("/updateStudent")
    48. public boolean updateStudent(@RequestBody Student student) {
    49. System.out.println("更新 " + student);
    50. return studentService.updateById(student);
    51. }
    52. }
    1. <script>
    2. export default {
    3. data() {
    4. return {
    5. ruleForm: {
    6. cname: null,
    7. ccredit: null
    8. },
    9. rules: {
    10. cname: [
    11. { required: true, message: '请输入名称', trigger: 'blur' },
    12. ],
    13. ccredit: [
    14. { required: true, message: '请输入学分', trigger: 'change' },
    15. { type: 'number', message: '请输入数字', trigger: 'blur' },
    16. ],
    17. }
    18. };
    19. },
    20. methods: {
    21. submitForm(formName) {
    22. this.$refs[formName].validate((valid) => {
    23. if (valid) {
    24. // 通过前端校验
    25. const that = this
    26. // console.log(this.ruleForm)
    27. axios.post("http://localhost:10086/course/save", this.ruleForm).then(function (resp) {
    28. console.log(resp)
    29. if (resp.data === true) {
    30. that.$message({
    31. showClose: true,
    32. message: '插入成功',
    33. type: 'success'
    34. });
    35. }
    36. else {
    37. that.$message.error('插入失败,请检查数据库t');
    38. }
    39. that.$router.push("/queryCourse")
    40. })
    41. } else {
    42. return false;
    43. }
    44. });
    45. },
    46. resetForm(formName) {
    47. this.$refs[formName].resetFields();
    48. },
    49. test() {
    50. console.log(this.ruleForm)
    51. }
    52. }
    53. }
    54. script>

    源码下载

    (CSDN 0积分下载):springboot+vue学生选课管理系统-Java文档类资源-CSDN下载

    或者加锋哥WX: java8822 (备用:java9266) 领取也行

    热门推荐

    我写了一套SpringBoot+SpringSecurity+Vue权限系统 实战课程,免费分享给CSDN的朋友们_java1234_小锋的博客-CSDN博客

    我写了一套SpringBoot微信小程序电商全栈就业实战课程,免费分享给CSDN的朋友们_java1234_小锋的博客-CSDN博客_java 实现微信分享

    springboot+vue前后端音乐网系统,挺漂亮的_java1234_小锋的博客-CSDN博客

    免费分享一个springboot+vue校园宿舍管理系统,挺漂亮的_java1234_小锋的博客-CSDN博客

  • 相关阅读:
    线路计算4800
    [Unity]将所有 TGA、TIFF、PSD 和 BMP(可自定义)纹理转换为 PNG,以减小项目大小,而不会在 Unity 中造成任何质量损失
    nginx 代理服务时遇到的问题
    如何保护数据和恢复感染[thekeyishere@cock.li].Elbie勒索病毒损失
    ai批量剪辑矩阵无人直播一站式托管系统源头技术开发
    fluttter学习之ButtonStyle 、MaterialStateProperty
    websocket系列基于spring-boot-starter-websocket实现
    Roaring Bitmap 更好的位图压缩算法
    【Hack The Box】windows练习-- Sauna
    【数据结构初阶】顺序表
  • 原文地址:https://blog.csdn.net/caoli201314/article/details/128060831