项目介绍
互联网发展到如今也近20年之久,视频信息一直作为互联网发展中的一个重要角色在不断更新进化。视频信息从最初的文本显示到现在集文字、视频、音频与一体,成为一种网络多媒体浏览网站。作为一种媒体传输媒介,视频信息如今也分各个类别,各种形式。本文着重对视频点播系统进行分析和研究,浅析视频点播的现状和存在的一些问题并对此进行研究,通过对问题和现状的分析研究和对用户需求的一个简单整理建模,设计并且实现一个视频点播系统。
视频点播系统采用的开发框架为SSM框架,也就是Spring mvc、Spring、MyBatis这三个框架,页面设计用的是jsp技术作为动态页面文件设计,jsp文件里可以对实现html等界面布局的代码,采用SpringMVC替代传统的struts2框架,主要对jsp访问的拦截和控制,Spring作为整个控制的核心,通过控制反转技术和面向切面技术,让Spring自动对使用的类文件进行调用和导入,MyBatis主要作为底层操作数据库,不牵扯业务逻辑,开发工具采用idea,服务器用的是tomcat。编码语言是Java,数据库采用Mysql。
4.2系统功能结构设计
下图就是系统功能结构图。
开发环境
编程语言:Java
数据库 :Mysql
系统架构:B/S
后端框架:SSM
编译工具:idea或者eclipse,jdk1.8,maven
支持定做:java/php/python/android/小程序ue/爬虫/c#/asp.net
系统实现
5.1 用户信息管理
管理员可以查询,修改,删除用户信息。下图就是用户信息管理页面。
图5.1 用户信息管理页面
5.2 视频分类管理
管理员可以对视频分类信息进行删除,查询和修改操作。下图就是视频分类管理页面。
图5.2视频分类信息管理页面
5.3 视频信息管理
管理员可以对视频信息进行查询,修改,删除操作。下图就是视频信息管理页面。
图5.3 视频信息管理页面
5.4 首页信息
用户可以在首页访问视频信息方面信息,首页上面有导航栏,视频信息,视频资讯,个人中心,后台管理等,点击导航栏视频信息可以看到很多信息,点击其他导航可以看到其他相关信息。下图就是首页信息页面。
图5.4 首页信息页面
核心代码
package com.controller;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.entity.EIException;
import com.service.ConfigService;
import com.utils.R;
/**
* 上传文件映射表
*/
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
@Autowired
private ConfigService configService;
/**
* 上传文件
*/
@RequestMapping("/upload")
public R upload(@RequestParam("file") MultipartFile file, String type,HttpServletRequest request) throws Exception {
if (file.isEmpty()) {
throw new EIException("上传文件不能为空");
}
String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
String fileName = new Date().getTime()+"."+fileExt;
File dest = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
file.transferTo(dest);
if(StringUtils.isNotBlank(type) && type.equals("1")) {
ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
if(configEntity==null) {
configEntity = new ConfigEntity();
configEntity.setName("faceFile");
configEntity.setValue(fileName);
} else {
configEntity.setValue(fileName);
}
configService.insertOrUpdate(configEntity);
}
return R.ok().put("file", fileName);
}
/**
* 下载文件
*/
@IgnoreAuth
@RequestMapping("/download")
public void download(@RequestParam String fileName, HttpServletRequest request, HttpServletResponse response) {
try {
File file = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
if (file.exists()) {
response.reset();
response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName+"\"");
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Access-Control-Allow-Credentials", "true");
response.setContentType("application/octet-stream; charset=UTF-8");
IOUtils.write(FileUtils.readFileToByteArray(file), response.getOutputStream());
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
论文参考
目 录
1 绪论 1
1.1 研究背景 1
1.2目的和意义 1
1.3 论文结构安排 2
2 相关技术 4
2.1 SSM框架介绍 4
2.2 B/S架构介绍 4
2.3 MySQL数据库介绍 5
2.4 JAVA语言介绍 6
2.5 VUE框架 6
3 系统分析 7
3.1系统可行性分析 7
3.1.1 技术可行性分析 7
3.1.2 经济可行性分析 7
3.1.3 运行可行性分析 7
3.2系统性能分析 8
3.2.1 系统安全性 8
3.2.2 数据完整性 8
3.2.3系统可扩展性 9
3.3系统流程分析 9
3.3.1系统登录流程 10
3.3.2信息添加流程 11
3.3.3信息删除流程 11
4 系统设计 13
4.1系统概要设计 13
4.2系统功能结构设计 13
4.3数据库设计 14
4.3.1数据库E-R图设计 14
4.3.2 数据库表结构设计 15
5 系统实现 19
5.1 用户信息管理 19
5.2 视频分类管理 19
5.3 视频信息管理 20
5.4 首页信息 20
6系统测试 22
6.1 本系统测试 22
6.1.1登录功能测试 22
6.1.2修改密码功能测试 23
6.2测试结果分析 23
结 论 24
参考文献 26
致 谢 27