基于javaweb的SpringBoot电影推荐系统(java+springboot+html+thymeleaf+easyui+bootstrap+mysql+maven)

运行环境

Java≥8、MySQL≥5.7

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

410023312402

430023312402

440023312402

450023312402

460023312402

470023312402

480023312402

基于javaweb的SpringBoot电影推荐系统(java+springboot+html+thymeleaf+easyui+bootstrap+mysql+maven)

项目介绍

本系统采用企业级开发标准,使用SpringBoot架构,数据访问层采用Spring Data Jpa,业务控制层采用SpringMvc,安全框架采用Shiro,实现了完整权限系统,Controller方法采用shiro注解,来实现有效的权限控制;界面采用了Easyui技术;在该项目中可以收录电影,收录电影系统,电影系统动态信息以及通过关键字查询你想要看的电影。在后台可以添加电影信息,对电影信动态的管理,电影信息管理,系统信息的管理等。

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
4.数据库:MySql 5.7版本;

技术栈

  1. 后端:SpringBoot+Spring Data Jpa+shiro

  2. 前端:html+easyui+bootstrap

使用说明
前台运行地址:http://localhost:8085 后台运行地址:http://localhost:8085/login

管理员账户:admin  密码:123456

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
		mav.addObject("webSiteInfoList", webSiteInfoService.getByFilmId(id));
mav.addObject("mainPage", "film/view");
mav.addObject("mainPageKey", "#f");
mav.addObject("film", film);
mav.setViewName("index");
return mav;
}

/**
* 获取下一篇博客和下一篇博客代码
* @param lastBlog
* @param nextBlog
* @return
*/
private String genUpAndDownPageCode(Film lastFilm,Film nextFilm){
StringBuffer pageCode=new StringBuffer();
if(lastFilm==null || lastFilm.getId()==null){
pageCode.append("<p>上一篇:没有了</p>");
}else{
pageCode.append("<p>上一篇:<a href='/film/"+lastFilm.getId()+"'>"+lastFilm.getTitle()+"</a></p>");
}
if(nextFilm==null || nextFilm.getId()==null){
pageCode.append("<p>下一篇:没有了</p>");
}else{
pageCode.append("<p>下一篇:<a href='/film/"+nextFilm.getId()+"'>"+nextFilm.getTitle()+"</a></p>");
}
return pageCode.toString();
}



}
package com.java1234.controller.admin;





/**
* 电影网站Controller类
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
		initSystem.loadData(request.getServletContext());
resultMap.put("success", true);
return resultMap;
}

/**
* 删除友情电影网站信息
* @param ids
* @param response
* @return
* @throws Exception
*/
@ResponseBody
@RequestMapping("/delete")
public Map<String,Object> delete(@RequestParam(value="ids")String ids,HttpServletRequest request)throws Exception{
String []idsStr=ids.split(",");
Map<String, Object> resultMap = new HashMap<>();
boolean flag=true;
for(int i=0;i<idsStr.length;i++){
Integer webSiteId=Integer.parseInt(idsStr[i]);
if(webSiteInfoService.getByWebSiteId(webSiteId).size()>0){
flag=false;
}else{
webSiteService.delete(Integer.parseInt(idsStr[i]));
}
}
initSystem.loadData(request.getServletContext());
if(flag){
resultMap.put("success", true);
}else{
resultMap.put("success", false);
resultMap.put("errorInfo", "电影动态信息中存在电影网站信息,不能删除!");
}
return resultMap;
}

}
package com.java1234.controller.admin;

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
	 * 进入后台管理请求
* @return
*/
@RequestMapping(value = "/admin")
public String toAdmin(){
return "admin/main";
}

/**
* 关于本站
* @return
*/
@RequestMapping("/aboutMe")
public ModelAndView aboutMe(){
ModelAndView mav=new ModelAndView();
mav.addObject("title", "关于本站");
mav.addObject("mainPage", "common/aboutMe");
mav.addObject("mainPageKey", "#a");
mav.setViewName("index");
return mav;
}

/**
* 登录请求
* @return
*/
@RequestMapping("/login")
public String login(){
return "login";
}

/**
* 网站根目录请求
* @return
*/
@RequestMapping("/")
public ModelAndView root() {
ModelAndView mav=new ModelAndView();
mav.addObject("title", "首页");
mav.addObject("mainPage", "film/indexFilm");
mav.addObject("mainPageKey", "#f");
mav.setViewName("index");
return mav;
}


}
package com.java1234.controller;


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
 * @throws Exception
*/
@ResponseBody
@RequestMapping("/list")
public Map<String,Object> list(WebSite webSite,@RequestParam(value="page",required=false)Integer page,@RequestParam(value="rows",required=false)Integer rows)throws Exception{
List<WebSite> webSiteList=webSiteService.list(webSite,page,rows);
Long total=webSiteService.getCount(webSite);
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("rows", webSiteList);
resultMap.put("total", total);
return resultMap;
}

/**
* 下拉框模糊查询
* @param name
* @return
* @throws Exception
*/
@ResponseBody
@RequestMapping("/comboList")
public List<WebSite> comboList(String q)throws Exception{
if(StringUtil.isEmpty(q)){
return null;
}
WebSite webSite=new WebSite();
webSite.setUrl(q);
return webSiteService.list(webSite, 1, 30); // 最多查询30条
}




/**
* 添加或者修改电影网站信息
* @param link
* @return
* @throws Exception
*/
@ResponseBody
@RequestMapping("/save")
public Map<String,Object> save(WebSite webSite,HttpServletRequest request)throws Exception{
Map<String, Object> resultMap = new HashMap<>();
webSiteService.save(webSite);
initSystem.loadData(request.getServletContext());
resultMap.put("success", true);
return resultMap;
}

/**
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
 * @throws Exception
*/
@ResponseBody
@RequestMapping("/delete")
public Map<String, Object> delete(@RequestParam(value = "ids") String ids, HttpServletRequest request) throws Exception {
String[] idsStr = ids.split(",");
Map<String, Object> resultMap = new HashMap<>();
boolean flag = true;
for (int i = 0; i < idsStr.length; i++) {
Integer filmId = Integer.parseInt(idsStr[i]);
if (webSiteInfoService.getByFilmId(filmId).size() > 0) {
flag = false;
} else {
filmService.delete(filmId);
}
}
initSystem.loadData(request.getServletContext());
if (flag) {
resultMap.put("success", true);
} else {
resultMap.put("success", false);
resultMap.put("errorInfo", "电影动态信息中存在电影信息,不能删除!");
}
return resultMap;
}

/**
* 根据id查询实体
*
* @param id
* @return
* @throws Exception
*/
@ResponseBody
@RequestMapping("/findById")
public Film findById(@RequestParam(value = "id") Integer id) throws Exception {
Film film = filmService.findById(id);
return film;
}

/**
* 上传图片
*
* @param file
* @return
*/
@ResponseBody
@RequestMapping("/ckeditorUpload")
public String ckeditorUpload(@RequestParam("upload") MultipartFile file, String CKEditorFuncNum) throws Exception {
// 获取文件名


项目链接:
https://javayms.github.io?id=251422322105200kf
https://javayms.pages.dev?id=251422322105200kf