(基于ssm的java毕业设计)网上在线学习平台的设计与实现(附源码+论文)

大家好!我是岛上程序猿,感谢您阅读本文,欢迎一键三连哦。

💞当前专栏:Java毕业设计

精彩专栏推荐👇🏻👇🏻👇🏻

🎀 安卓app毕业设计
🌎微信小程序毕业设计

一、项目简介

如今随着信息化技术的大发展,人们学习的方式发生了很大的改变,如何更好地整合时间空间等学习资源成为了当今热门的话题。学生尤其是中小学生需要学习的知识很多,除了本身在校学习知识之外,兴趣爱好等的学习也不可或缺。网上在线学习平台很好的完成了这样的目的,能够让爱学习的你随时随地的学习需要的课外内容,教师也可以更好的把学习视频乃至作业布置到系统上,以供学生学习。管理员作为系统维护员可以针对系统资源进行管理。总体来说系统是通过SSM架构搭建后台的,中间件使用的是tomcat服务器,数据库管理系统采用开源的Mysql,前端使用的主要是jsp页面展示技术。通过测试,该系统能够较好的完成设定的目标。

二、系统设计

2.1软件功能模块设计

系统的整体架构确定以后,再来看网上在线学习平台的主要功能模块图。整体的功能模块包括前台和后台,前台就是主要的页面,包括首页、可见下载页面、课程视频等页面。后台的模块主要有学生模块、教师模块、管理员模块和教学资源模块等。确定了模块以后,再设计各个模块的功能特点,方便抽取出各个模块的公共部分来。
在这里插入图片描述

2.2数据库设计

系统单独E-R图如图下所示:在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

三、系统项目部分截图

3.1网站主页功能实现

在这里插入图片描述

3.2学生注册登录功能实现

注册操作本质上是在数据库表中添加用户信息。在用户注册的时候,是需要进行前台校验的,系统使用的是validate前台校验框架。在这里插入图片描述

3.3系统上传下载功能实现

网上在线学习平台管理员和老师都可以上传一些图片和视频等信息,该类信息由于体积比较大,一般的是情况下是不合适放到mysql数据库中的,上传和下载需要使用到一个jar包,,具体的实现界面如下图:

在这里插入图片描述

四、论文目录

第一章 绪论 1
1.1 研究的背景和意义 1
1.2 论文的主要研究内容与研究方法 1
1.3系统的特点 2
1.4论文结构 2
第二章 系统关键技术 4
2.1 Java EE 4
2.2 SSM框架 4
2.3 前端jQuery框架 5
2.4 Tomcat服务器 6
2.5 本章小结 6
第三章 系统分析 7
3.1系统需求 7
3.2可行性分析 7
3.3 用例图 8
第四章 系统设计 12
4.1系统总体架构设计 12
4.1.1系统总体开发流程 12
4.1.2系统开发架构的选择 12
4.2系统功能模块设计 13
4.2.1整体功能模块设计 13
4.2.2 前台页面设计 13
4.2.3 学生模块设计 14
4.2.4 评论管理模块设计 14
4.2.5视频课程管理模块设计 15
4.3系统E-R图 15
4.4数据库逻辑设计 17
第五章 系统的实现 22
5.1 系统总体的逻辑结构图 22
5.1.1系统MVC结构图 22
5.1.2系统的三层架构图 22
5.2系统功能实现 23
5.2.1网站主页功能实现 23
5.2.2学生注册登录功能实现 24
5.2.3修改密码功能实现 25
5.2.4 学生评论功能实现 26
5.2.5系统上传下载功能实现 26
第6章系统测试 28
6.1系统测试的目的 28
6.2系统可用性测试 28
6.3系统典型测试用例 28
6.4本章小结 30
致 谢 31
参考文献 32

五、部分核心代码

4.1 用户部分

package com.daowen.controller;

import com.daowen.entity.Users;
import com.daowen.service.SysroleService;
import com.daowen.service.UsersService;
import com.daowen.ssm.simplecrud.SimpleController;
import com.daowen.webcontrol.PagerMetal;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

@Controller
@Scope("prototype")
@Qualifier("value=usersController")
public class UsersController extends SimpleController {

	@Autowired
	private UsersService usersService;
	@Autowired
	private SysroleService sysroleSrv;

	@RequestMapping("/admin/usersmanager.do")
	public void mapping(HttpServletRequest request, HttpServletResponse response) {
		this.mappingMethod(request, response);
	}

	public void modifyPw() {
		String password1 = request.getParameter("password1");
		String repassword1 = request.getParameter("repassword1");
		String forwardurl = request.getParameter("forwardurl");
		String id = request.getParameter("id");
		if (id == null || id == "")
			return;
		Users users = usersService.load(new Integer(id));
		if (users != null) {
			if (!users.getPassword().equals(password1)) {
				request.setAttribute("errormsg", "<label class='error'>原始密码不正确,不能修改</label>");
				forward(forwardurl);

			} else {
				users.setPassword(repassword1);
				usersService.update(users);
				request.getSession().setAttribute("users", users);
				redirect(forwardurl);
			}
		}
	}

	public void save() {
		String username = request.getParameter("username");
		String password = request.getParameter("password");
		String creator = request.getParameter("creator");
		String email = request.getParameter("email");
		String tel = request.getParameter("tel");
		String realname = request.getParameter("realname");
		String nickname = request.getParameter("nickname");
		String rolename = request.getParameter("rolename");
		String roleid = request.getParameter("roleid");
		String sex = request.getParameter("sex");
		String xiangpian = request.getParameter("xiangpian");
		SimpleDateFormat sdfusers = new SimpleDateFormat("yyyy-MM-dd");
		Users users = new Users();
		users.setUsername(username == null ? "" : username);
		users.setPassword(password == null ? "" : password);
		users.setCreator(creator == null ? "" : creator);
		users.setCreatetime(new Date());
		users.setEmail(email == null ? "" : email);
		users.setTel(tel == null ? "" : tel);
		users.setLogtimes(0);
		users.setRolename(rolename == null ? "部门管理员" : rolename);
		users.setRoleid(roleid == null ? 0 : Integer.parseInt(roleid));
		users.setRealname(realname == null ? "" : realname);
		users.setNickname(nickname == null ? "" : nickname);
		users.setSex(sex == null ? "" : sex);
		users.setXiangpian(xiangpian == null ? "" : xiangpian);
		usersService.save(users);
		String forwardurl = request.getParameter("forwardurl");
		if (forwardurl == null) {
			forwardurl = "/admin/usersmanager.do?actiontype=get";
		}
		redirect(forwardurl);
	}

	public void updatewage() {
		String id = request.getParameter("id");
		String basicwage = request.getParameter("basicwage");
		String forwardurl = request.getParameter("forwardurl");
		String jixiao = request.getParameter("jixiao");
		if (id == null)
			return;
		Users users = (Users) usersService.load(new Integer(id));
		if (users == null)
			return;
		users.setBasicwage(basicwage == null ? 0 : new Integer(basicwage));
		users.setJixiao(jixiao == null ? (double) 0 : new Double(jixiao));
		usersService.update(users);
		if (forwardurl == null) {
			forwardurl = "/admin/usersmanager.do?actiontype=get";
		}
		redirect(forwardurl);
	}

	public void update() {
		String id = request.getParameter("id");
		if (id == null)
			return;
		Users users = (Users) usersService.load(new Integer(id));
		if (users == null)
			return;
		String username = request.getParameter("username");
		String creator = request.getParameter("creator");
		String email = request.getParameter("email");
		String tel = request.getParameter("tel");
		String realname = request.getParameter("realname");
		String roleid = request.getParameter("roleid");
		String rolename = request.getParameter("rolename");
		String nickname = request.getParameter("nickname");
		String sex = request.getParameter("sex");
		String xiangpian = request.getParameter("xiangpian");
		SimpleDateFormat sdfusers = new SimpleDateFormat("yyyy-MM-dd");
		users.setUsername(username);
		users.setEmail(email);
		users.setTel(tel);
		users.setRealname(realname);
		users.setRoleid(roleid == null ? 1 : Integer.parseInt(roleid));
		users.setRolename(rolename == null ? "" : rolename);
		users.setNickname(nickname);
		users.setSex(sex);
		users.setXiangpian(xiangpian);
		usersService.update(users);
		String forwardurl = request.getParameter("forwardurl");
		if (forwardurl == null) {
			forwardurl = "/admin/usersmanager.do?actiontype=get";
		}
		redirect(forwardurl);

	}

	public void load() {
		String id = request.getParameter("id");
		String actiontype = "save";
		if (id != null) {
			Users users = (Users) usersService.load(new Integer(id));
			if (users != null) {
				request.setAttribute("users", users);
			}
			actiontype = "update";
		}
		request.setAttribute("id", id);
		List<Object> roleid_datasource = sysroleSrv.getEntity("");
		request.setAttribute("roleid_datasource", roleid_datasource);
		request.setAttribute("actiontype", actiontype);
		String forwardurl = request.getParameter("forwardurl");
		if (forwardurl == null) {
			forwardurl = "/admin/usersadd.jsp";
		}
		forward(forwardurl);
	}

	public void delete() {
		String[] ids = request.getParameterValues("ids");
		if (ids == null)
			return;
		String spliter = ",";
		String SQL = " where id in(" + join(spliter, ids)
				+ ")";
		System.out.println("sql=" + SQL);
		usersService.delete(SQL);
	}

	public void get() {
		int pageindex = 1;
		int pagesize = 10;
		String filter = "where 1=1 ";
		String username=request.getParameter("username");
		if(username!=null)
			filter+=" and username like '%"+username+"%' ";
		// 获取当前分页
		String currentpageindex = request.getParameter("currentpageindex");
		// 当前页面尺寸
		String currentpagesize = request.getParameter("pagesize");
		// 设置当前页
		if (currentpageindex != null)
			pageindex = new Integer(currentpageindex);
		// 设置当前页尺寸
		if (currentpagesize != null)
			pagesize = new Integer(currentpagesize);

		List<Users> usersList = usersService.getPageEntitys(filter, pageindex, pagesize);
		int recordscount = usersService.getRecordCount(filter);
		request.setAttribute("listusers", usersList);
		PagerMetal pm = new PagerMetal(recordscount);
		// 设置尺寸
		pm.setPagesize(pagesize);
		// 设置当前显示页
		pm.setCurpageindex(pageindex);
		// 设置分页信息
		request.setAttribute("pagermetal", pm);
		String forwardurl = request.getParameter("forwardurl");
		System.out.println("forwardurl=" + forwardurl);
		if (forwardurl == null) {
			forwardurl = "/admin/usersmanager.jsp";
		}
		forward(forwardurl);
	}

}

4.2教师部分

package com.daowen.controller;

import java.text.SimpleDateFormat;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.daowen.entity.Teacher;
import com.daowen.service.TeacherService;
import com.daowen.ssm.simplecrud.SimpleController;
import com.daowen.webcontrol.PagerMetal;
@Controller
public class TeacherController extends SimpleController {

	@Override
	@RequestMapping("/admin/teachermanager.do")
	public void mapping(HttpServletRequest request, HttpServletResponse response) {
		
		mappingMethod(request,response);

	}
	public void modifyPw() {
		String password1 = request.getParameter("password1");
		String repassword1 = request.getParameter("repassword1");

		String forwardurl = request.getParameter("forwardurl");
		String errorpageurl = request.getParameter("errorpageurl");
		String id = request.getParameter("id");
		if (id == null || id == "")
			return;
		Teacher teacher = teacherSrv.load(new Integer(id));
		if (teacher != null) {
			if (!teacher.getPassword().equals(password1)) {
				
					request.setAttribute("errormsg",
							"<label class='error'>原始密码不正确,不能修改</label>");
					forward(forwardurl);
				
			} else {
				teacher.setPassword(repassword1);
				teacherSrv.update(teacher);
				request.getSession().setAttribute("teacher", teacher);
				redirect(forwardurl);
			}
		}
	}


	public void delete() {
		String[] ids = request.getParameterValues("ids");
		if (ids == null)
			return;
		String spliter = ",";
		String SQL = " where id in(" + join(spliter, ids) + ")";
		System.out.println("sql=" + SQL);
		teacherSrv.delete(SQL);
	}
	/*************************************************************
	 **************** 保存动作监听支持******************************
	 **************************************************************/
	public void save() {
		String tno = request.getParameter("tno");
		String name = request.getParameter("name");
		String sex = request.getParameter("sex");
		String xiangpian = request.getParameter("xiangpian");

		String zhicheng = request.getParameter("zhicheng");
		String xueli = request.getParameter("xueli");
		String jiguan = request.getParameter("jiguan");
		String hyid = request.getParameter("hyid");
		String hyname = request.getParameter("hyname");

		String email = request.getParameter("email");
		String mobile = request.getParameter("mobile");
		String jiaoyanshi = request.getParameter("jiaoyanshi");
		String lvli = request.getParameter("lvli");
		SimpleDateFormat sdfteacher = new SimpleDateFormat("yyyy-MM-dd");
		Teacher teacher = new Teacher();

		teacher.setTno(tno == null ? "" : tno);
		teacher.setName(name == null ? "" : name);
		teacher.setSex(sex == null ? "" : sex);
		teacher.setXiangpian(xiangpian == null ? "" : xiangpian);
		teacher.setLogintimes(0);
		teacher.setPassword("123456");
		teacher.setZhicheng(zhicheng == null ? "" : zhicheng);
		teacher.setXueli(xueli == null ? "" : xueli);
		teacher.setJiguan(jiguan == null ? "" : jiguan);
		teacher.setAge(40);
		teacher.setEmail(email == null ? "" : email);
		teacher.setMobile(mobile == null ? "" : mobile);
		teacher.setJiaoyanshi(jiaoyanshi == null ? "" : jiaoyanshi);
		teacher.setLvli(lvli == null ? "" : lvli);
		teacherSrv.save(teacher);
		String forwardurl = request.getParameter("forwardurl");
		if (forwardurl == null) {
			forwardurl = "/admin/teachermanager.do?actiontype=get";
		}
        redirect(forwardurl);
	}

	/******************************************************
	 *********************** 更新内部支持*********************
	 *******************************************************/
	public void update() {
		String id = request.getParameter("id");

		String forwardurl = request.getParameter("forwardurl");
		if (id == null)
			return;
		Teacher teacher =teacherSrv.load(new Integer(id));
		if (teacher == null)
			return;
		String tno = request.getParameter("tno");
		String name = request.getParameter("name");
		String sex = request.getParameter("sex");
		String xiangpian = request.getParameter("xiangpian");
		String hyid = request.getParameter("hyid");
		String hyname = request.getParameter("hyname");

		String zhicheng = request.getParameter("zhicheng");
		String xueli = request.getParameter("xueli");
		String email = request.getParameter("email");
		String mobile = request.getParameter("mobile");
		String lvli = request.getParameter("lvli");
		SimpleDateFormat sdfteacher = new SimpleDateFormat("yyyy-MM-dd");
		if(tno!=null)
		   teacher.setTno(tno);
		teacher.setName(name);
		teacher.setSex(sex);
		teacher.setXiangpian(xiangpian);

		teacher.setZhicheng(zhicheng);
		teacher.setXueli(xueli);
		teacher.setEmail(email);
		teacher.setMobile(mobile);
		teacher.setLvli(lvli);
		
		teacherSrv.update(teacher);

		if (forwardurl == null) {
			forwardurl = "/admin/teachermanager.do?actiontype=get";
		}

		 redirect(forwardurl);

	}

	/******************************************************
	 *********************** 加载内部支持*********************
	 *******************************************************/
	public void load() {
		//
		String id = request.getParameter("id");
		String actiontype = "save";
		String forwardurl = request.getParameter("forwardurl");
		dispatchParams(request, response);
		if (id != null) {
			Teacher teacher = teacherSrv.load("where id="
					+ id);
			if (teacher != null) {
				request.setAttribute("teacher", teacher);
			}
			actiontype = "update";
			request.setAttribute("id", id);
		}

		
		request.setAttribute("actiontype", actiontype);

		if (forwardurl == null) {
			forwardurl = "/admin/teacheradd.jsp";
		}
		forward(forwardurl);

	}

	/******************************************************
	 *********************** 数据绑定内部支持*********************
	 *******************************************************/
	public void get() {
		String filter = "where 1=1 ";
		//
		int pageindex = 1;
		int pagesize = 10;
		// 获取当前分页
		String currentpageindex = request.getParameter("currentpageindex");
		// 当前页面尺寸
		String currentpagesize = request.getParameter("pagesize");
		// 设置当前页
		if (currentpageindex != null)
			pageindex = new Integer(currentpageindex);
		// 设置当前页尺寸
		if (currentpagesize != null)
			pagesize = new Integer(currentpagesize);
		List<Teacher> listteacher = teacherSrv.getPageEntitys(filter,
				pageindex, pagesize);
		int recordscount = teacherSrv.getRecordCount(filter == null ? "" : filter);
		request.setAttribute("listteacher", listteacher);
		PagerMetal pm = new PagerMetal(recordscount);
		// 设置尺寸
		pm.setPagesize(pagesize);
		// 设置当前显示页
		pm.setCurpageindex(pageindex);
		// 设置分页信息
		request.setAttribute("pagermetal", pm);
		// 分发请求参数
		dispatchParams(request, response);
		String forwardurl = request.getParameter("forwardurl");
		System.out.println("forwardurl=" + forwardurl);
		if (forwardurl == null) {
			forwardurl = "/admin/teachermanager.jsp";
		}
		forward(forwardurl);

	}
	
	@Autowired
	private TeacherService teacherSrv=null;
	
}


获取源码或论文

如需对应的源码,可以评论或者私信都可以。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值