作者主页:源码空间站2022
简介:Java领域优质创作者、Java项目、学习资料、技术互助
文末获取源码
项目介绍
随着中国教育体制的不断改革与完善,学校的学生教师管理员等对互联网的使用也越来越频繁。随着学生与教师数量的不断增多,教务管理的容量,安全性,便捷性显得尤为重要。传统的人工管理的劣势也慢慢显现出来,但是其中的一优点还需要继续采纳,所以传统的人工与计算机的结合成为了目前的主流。对此我开发了一套基于SSM框架的教务管理系统。
该系统采用的是Spring、SpringMVC、Mybatis、Shiro、LayUI、腾讯云。
该项目分为管理员、教师、学生三种角色。
主要实现了用户的登录注册,公告的浏览,选课操作,不同的管理员对不同信息的管理,教师对课程评分,教师结课等功能。该系统我在完成基础功能的前提下完成了上线。
关键词:教务;教务管理系统;云服务器;JAVA;SSM
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
5.数据库:MySql 8.0版本;
6.是否Maven项目:是;
技术栈
1. 后端:Spring+SpringMVC+Mybatis+Shiro
2. 前端:JSP+LayUI+Echarts+jQuery
使用说明
1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;
3. 将项目中db.properties配置文件中的数据库配置改为自己的配置;
4. 运行项目,输入localhost:8080/ 登录
管理员:admin 123456
学生:zhangsan 123456
教师:wangliu 123456
运行截图
相关代码
基础课程控制器
package com.jubilantz.controller;
import com.jubilantz.entity.EasBaseCourse;
import com.jubilantz.entity.EasClass;
import com.jubilantz.services.EasBaseCourseService;
import com.jubilantz.utils.PageUtil;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Author JubilantZ
* @Date: 2021/4/21 21:40
*/
@Controller
@RequestMapping("/easBaseCourse")
public class EasBaseCourseController {
@Autowired
private EasBaseCourseService easBaseCourseService;
@RequestMapping("/index")
public String index() throws Exception {
return "system/baseCourse/index";
}
@RequestMapping("/list")
@ResponseBody
public Map<String,Object> list(@RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer limit,
EasBaseCourse easBaseCourse) throws Exception{
Map<String,Object> map = new HashMap<>();
int count = easBaseCourseService.getCount();
// System.out.println("总行数:"+count);
PageUtil pageUtil = new PageUtil(page,limit);
List<EasBaseCourse> list = easBaseCourseService.getList(easBaseCourse,pageUtil);
map.put("count",count);
map.put("data",list);
map.put("code",0);
map.put("msg","");
return map;
}
@RequestMapping("/baseCourseAddForm")
public String baseCourseAddForm() throws Exception {
return "system/baseCourse/baseCourseAddForm";
}
@RequestMapping(value = "/addBaseCourse",method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> addBaseCourse(EasBaseCourse easBaseCourse) throws Exception{
Map<String,Object> map = new HashMap<>();
// System.out.println("我是基本课程名称:"+easBaseCourse.getCoursename());
// System.out.println("我是基本课程简介:"+easBaseCourse.getSynopsis());
List<EasBaseCourse> list = easBaseCourseService.findBaseCourseName(easBaseCourse.getCoursename());
if (list.size() != 0){
map.put("msg","基本课程已存在");
map.put("result",false);
}else if(easBaseCourse.getCoursename().length() <= 0){
map.put("msg","课程名称不能为空");
map.put("result",false);
}else{
//课程为null也可以添加 待完善
easBaseCourseService.addBaseCourse(easBaseCourse);
map.put("msg","添加成功");
map.put("result",true);
}
return map;
}
@RequestMapping("/batchDeleteBaseCourse")
@ResponseBody
@RequiresPermissions("basecourse:delete")
public Map<String, Object> batchDeleteBaseCourse(Integer[] ids) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
easBaseCourseService.batchDeleteBaseCourse(ids);
map.put("msg","删除成功");
map.put("result",true);
return map;
}
@RequestMapping(value = "/getBaseCourseView")
@ResponseBody
public EasBaseCourse getBaseCourseView(Integer id) throws Exception {
return easBaseCourseService.getBaseCourseView(id);
}
@RequestMapping(value = "/editBaseCourse",method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> editBaseCourse(EasBaseCourse easBaseCourse) throws Exception{
Map<String, Object> map = new HashMap<>();
easBaseCourseService.updateBaseCourse(easBaseCourse);
map.put("result",true);
return map;
}
@RequestMapping("/search")
@ResponseBody
public List<EasBaseCourse> search() throws Exception{
return easBaseCourseService.getAll();
}
}
如果你也想学习本系统,下面领取。关注并回复:176ssm