基于javaweb的SpringBoot协同过滤算法新闻管理系统(java+springboot+maven+mysql+mybatis+vue+element-ui)

运行环境

Java≥8、MySQL≥5.7、Node.js≥14

开发工具

后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可

❗没学过node.js的不要搞前后端分离项目

适用

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

功能说明

001424160701

011424160701

021424160701

541424150701

551424150701

561424150701

571424150701

591424150701

基于javaweb的SpringBoot协同过滤算法新闻管理系统(java+springboot+maven+mysql+mybatis+vue+element-ui)

项目介绍

本项目新闻推荐管理系统;

前台:
登录、首页、全部新闻、系统公告、热点资讯、个人账户、个人收藏
后台: (1)网站管理 (2)用户管理 (3)内容管理 (4)模块管理 (5)个人管理

技术栈
后端:java + springboot + mybatis …
前端:vue + element …

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
                sql.append(sqlwhere).append(" and ");
}
sql.delete(sql.length() - 4, sql.length());
sql.append(" ");
return sql.toString();
} catch (UnsupportedEncodingException e) {
log.info("拼接sql 失败:{}", e.getMessage());
}
}else {
if (sqlwhere!=null && !sqlwhere.trim().equals("")) {
StringBuilder sql = new StringBuilder(" WHERE ");
sql.append(sqlwhere);
return sql.toString();
}
}
return "";
}

public Map<String,Object> readBody(BufferedReader reader){
BufferedReader br = null;
StringBuilder sb = new StringBuilder("");
try{
br = reader;
String str;
while ((str = br.readLine()) != null){
sb.append(str);
}
br.close();
String json = sb.toString();
return JSONObject.parseObject(json, Map.class);
}catch (IOException e){
e.printStackTrace();
}finally{
if (null != br){
try{
br.close();
}catch (IOException e){
e.printStackTrace();
}
}
}
return null;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
        query.put("token", token);
AccessToken byToken = tokenService.findOne(query);
if(byToken == null){
return 0;
}
return byToken.getUser_id();
}

/**
* 重写add
* @return
*/
@PostMapping("/add")
@Transactional
public Map<String, Object> add(HttpServletRequest request) throws IOException {
Map<String,Object> map = service.readBody(request.getReader());
map.put("password",service.encryption(String.valueOf(map.get("password"))));
service.insert(map);
return success(1);
}

}

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

}




/**
* 新闻分类:(NewsClassification)表控制层
*
*/
@RestController
@RequestMapping("/news_classification")
public class NewsClassificationController extends BaseController<NewsClassification, NewsClassificationService> {

/**
* 新闻分类对象
*/
@Autowired
public NewsClassificationController(NewsClassificationService service) {
setService(service);
}

@PostMapping("/add")
@Transactional
public Map<String, Object> add(HttpServletRequest request) throws IOException {
Map<String,Object> paramMap = service.readBody(request.getReader());
this.addMap(paramMap);
return success(1);
}

}


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
 * (NavAdmin)表控制层
*
*/
@RestController
@RequestMapping("nav_admin")
public class NavAdminController extends BaseController<NavAdmin, NavAdminService> {
/**
* 服务对象
*/
@Autowired
public NavAdminController(NavAdminService service) {
setService(service);
}

}






/**
* 收藏:(Collect)表控制层
*
*/
@RestController
@RequestMapping("collect")
public class CollectController extends BaseController<Collect, CollectService> {
/**
* 服务对象
*/
@Autowired
public CollectController(CollectService service) {
setService(service);
}

}




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

/**
* 点赞:(Hits)表控制层
*/
@RestController
@RequestMapping("hits")
public class HitsController extends BaseController<Hits, HitsService> {
/**
* 服务对象
*/
@Autowired
public HitsController(HitsService service) {
setService(service);
}

}






/**
* 文章:用于内容管理系统的文章(Article)表控制层
*
*/
@RestController
@RequestMapping("article")
public class ArticleController extends BaseController<Article, ArticleService> {
/**
* 服务对象
*/
@Autowired
public ArticleController(ArticleService service) {
setService(service);
}

}

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
        setService(service);
}

}






/**
* 公告:(Notice)表控制层
*
*/
@RestController
@RequestMapping("notice")
public class NoticeController extends BaseController<Notice, NoticeService> {
/**
* 服务对象
*/
@Autowired
public NoticeController(NoticeService service) {
setService(service);
}

}






/**
* 点赞:(Praise)表控制层
*
*/
@RestController
@RequestMapping("praise")


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