——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明





基于javaweb的SSM+Maven动漫影视管理系统视频播放系统(java+ssm+jsp+jquery+mysql)
项目介绍
本项目分为前后台,前台为普通用户登录,后台为管理员登录。
管理员角色包含以下功能: 管理员登陆,用户管理,影片列表管理,管理影片等功能。
用户角色包含以下功能: 用户登录注册,用户首页,视频简介,视频播放,评论视频,查看我收藏的视频,查看我的评论等功能。
环境需要
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 5.7版本; 6.是否Maven项目:是;
技术栈
- 后端:Spring+SpringMVC+Mybatis 2. 前端:JSP+CSS+JavaScript+jQuery
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中application.yml配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入localhost:8080/ 登录
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| */ @RequestMapping(value = "/exUpdate") public String exUpdate(Comment comment, Model model, HttpServletRequest request, HttpServletResponse response) { commentService.updateById(comment); return "redirect:/comment/findBySql.action"; }
@RequestMapping(value = "/delete") public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { commentService.deleteById(id);
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| return jsonObject.toString(); }
@RequestMapping(value = "/listByEntityJson", method = RequestMethod.POST) @ResponseBody public String listByEntityJson(Film film, HttpServletRequest request, HttpServletResponse response){ List<Film> listAll = filmService.listAllByEntity(film); JSONObject jsonObject = new JSONObject(); jsonObject.put("list", listAll); jsonObject.put("obj", film); return jsonObject.toString(); }
@RequestMapping(value = "/listByMapJson", method = RequestMethod.POST) @ResponseBody public String listByMapJson(Film film,HttpServletRequest request, HttpServletResponse response){ Map<String,Object> params = new HashMap<String,Object>(); if(!isEmpty(film.getName())){ params.put("name", film.getName()); } if(!isEmpty(film.getContent())){ params.put("content", film.getContent()); }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| } if(!isEmpty(film.getContent())){ sql += " and content like '%"+film.getContent()+"%'"; } if(!isEmpty(film.getIsDelete())){ sql += " and isDelete like '%"+film.getIsDelete()+"%'"; } if(!isEmpty(film.getPic())){ sql += " and pic like '%"+film.getPic()+"%'"; } sql += " ORDER BY ID DESC "; Pager<Film> pagers = filmService.findBySqlRerturnEntity(sql); model.addAttribute("pagers", pagers); model.addAttribute("obj", film); return "film/film"; }
@RequestMapping(value = "/findByMap") public String findByMap(Film film, Model model, HttpServletRequest request, HttpServletResponse response) { Map<String,Object> params = new HashMap<String,Object>(); if(!isEmpty(film.getName())){ params.put("name", film.getName()); } if(!isEmpty(film.getContent())){ params.put("content", film.getContent()); } if(!isEmpty(film.getIsDelete())){ params.put("isDelete", film.getIsDelete()); } if(!isEmpty(film.getPic())){ params.put("pic", film.getPic()); } Pager<Film> pagers = filmService.findByMap(params);
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
| if(!isEmpty(film.getPic())){ params.put("pic", film.getPic()); } Pager<Film> pagers = filmService.findByMap(params); model.addAttribute("pagers", pagers); model.addAttribute("obj", film); return "film/film"; }
@RequestMapping(value = "/add") public String add() { return "film/add"; }
@RequestMapping(value = "/view") public String view(Integer id,Model model) { Film obj = filmService.load(id); List<Comment> listBySqlReturnEntity = commentService.listBySqlReturnEntity("SELECT * FROM comment WHERE filmId="+id+" order by addTime desc"); model.addAttribute("obj",obj); model.addAttribute("list",listBySqlReturnEntity); List<FilmDetail> listBySqlReturnEntity2 = filmDetailService.listBySqlReturnEntity("SELECT * FROM film_detail WHERE filmId = "+id); model.addAttribute("datails",listBySqlReturnEntity2); return "film/view"; }
@RequestMapping(value = "/exAdd") public String exAdd(@RequestParam(value = "file", required = false) MultipartFile file,HttpServletRequest request,Film film, Model model, HttpServletResponse response) throws IllegalStateException, IOException { if (!file.isEmpty()){ System.out.println("开始"); long startTime=System.currentTimeMillis(); System.out.println("fileName:"+file.getOriginalFilename()); String n = UUIDUtils.create(); String path=Thread.currentThread().getContextClassLoader().getResource("").getPath().substring(0,Thread.currentThread().getContextClassLoader().getResource("").getPath().length()-16)+"/upload/"+n+file.getOriginalFilename();
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
@RequestMapping(value = "/exUpdate") public String exUpdate(Comment comment, Model model, HttpServletRequest request, HttpServletResponse response) { commentService.updateById(comment); return "redirect:/comment/findBySql.action"; }
@RequestMapping(value = "/delete") public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { commentService.deleteById(id);
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
@Controller @RequestMapping("/user") public class UserController extends BaseController {
@Autowired private UserService userService;
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=111122522008200nz
https://javayms.pages.dev?id=111122522008200nz