基于javaweb的SSM音乐管理系统(java+ssm+jsp+jquery+h-ui+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

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

适用

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

功能说明

542323421807

552323421807

562323421807

572323421807

582323421807

032024443108

基于javaweb的SSM音乐管理系统(java+ssm+jsp+jquery+h-ui+mysql)

项目介绍

本在线音乐网站采用JSP动态网页开发技术,JAVA编程语言,基于B/S架构,使用SSM框架技术,使用MySQL数据库,充分保证了系统的稳定性和安全性。

该系统主要分为前台和后台两大功能模块,共包含两个角色:用户、管理员。 具体的系统功能如下: 1.前台功能 前台首页、音乐浏览、音乐搜索、音乐分类查找、音乐详情、音乐播放、音乐下载、添加收藏、新闻公告、留言交流、用户注册、用户登陆、个人中心、用户信息修改、我的收藏、意见反馈、修改密码等功能。 2.后台功能 后台系统登陆、管理员管理、用户信息管理、音乐管理、音乐类型管理、新闻公告管理、用户评价管理、意见反馈管理、留言交流管理、消息回复管理等功能。

环境需要

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.是否Maven项目: 否;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目; 6.数据库:MySql 5.7/8.0等版本均可;

技术栈

后台框架:Spring、SpringMVC、MyBatis UI界面:JSP、jQuery 、H-ui 数据库:MySQL

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;

  2. 使用IDEA/Eclipse/MyEclipse导入项目,修改配置,运行项目;

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
	}

public RebbsService getRebbsService() { return rebbsService; }

public void setRebbsService(RebbsService rebbsService) { this.rebbsService = rebbsService; }

}
//

//定义为控制器
@Controller
// 设置路径
@RequestMapping(value = "/hist" , produces = "text/plain;charset=utf-8")
public class HistController extends BaseController {
// 注入Service 由于标签的存在 所以不需要getter setter
@Autowired
private HistService histService;
@Autowired
private UsersService usersService;
@Autowired
private MusicService musicService;

// 准备添加数据
@RequestMapping("createHist.action")
public String createHist() {
List<Users> usersList = this.usersService.getAllUsers();
this.getRequest().setAttribute("usersList", usersList);
List<Music> musicList = this.musicService.getAllMusic();
this.getRequest().setAttribute("musicList", musicList);
return "admin/addhist";
}
// 添加数据
@RequestMapping("addHist.action")
public String addHist(Hist hist) {
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
	response.addHeader("Content-Disposition", "attachment;filename=" + filename);
response.setContentType("multipart/form-data");
BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream());
int len = 0;
while ((len = bis.read()) != -1) {
out.write(len);
out.flush();
}
out.close();
}

@RequestMapping("query.action")
public String query(String name) {
this.front();
Music music = new Music();
music.setMusicname(name);
List<Music> musicList = this.musicService.getMusicByLike(music);
this.getRequest().setAttribute("musicList", musicList);
return "users/list";
}

// 准备登录
@RequestMapping("preLogin.action")
public String prelogin() {
this.front();
return "users/login";
}

// 用户登录
@RequestMapping("login.action")
public String login() {
this.front();
String username = this.getRequest().getParameter("username");
String password = this.getRequest().getParameter("password");
Users u = new Users();
u.setUsername(username);
List<Users> usersList = this.usersService.getUsersByCond(u);
if (usersList.size() == 0) {
this.getSession().setAttribute("message", "用户名不存在");
return "redirect:/index/preLogin.action";
} else {
Users users = usersList.get(0);
if ("锁定".equals(users.getStatus())) {
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
	public TopicService getTopicService() { return topicService; }

public void setTopicService(TopicService topicService) { this.topicService = topicService; }

}
//

//定义为控制器
@Controller
// 设置路径
@RequestMapping(value = "/rebbs" , produces = "text/plain;charset=utf-8")
public class RebbsController extends BaseController {
// 注入Service 由于标签的存在 所以不需要getter setter
@Autowired
private RebbsService rebbsService;
@Autowired
private UsersService usersService;
@Autowired
private BbsService bbsService;

// 准备添加数据
@RequestMapping("createRebbs.action")
public String createRebbs() {
List<Users> usersList = this.usersService.getAllUsers();
this.getRequest().setAttribute("usersList", usersList);
List<Bbs> bbsList = this.bbsService.getAllBbs();
this.getRequest().setAttribute("bbsList", bbsList);
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
@RequestMapping("login.action")
public String login() {
this.front();
String username = this.getRequest().getParameter("username");
String password = this.getRequest().getParameter("password");
Users u = new Users();
u.setUsername(username);
List<Users> usersList = this.usersService.getUsersByCond(u);
if (usersList.size() == 0) {
this.getSession().setAttribute("message", "用户名不存在");
return "redirect:/index/preLogin.action";
} else {
Users users = usersList.get(0);
if ("锁定".equals(users.getStatus())) {
this.getSession().setAttribute("message", "账户被锁定");
return "redirect:/index/preLogin.action";
}
if (password.equals(users.getPassword())) {
this.getSession().setAttribute("userid", users.getUsersid());
this.getSession().setAttribute("username", users.getUsername());
this.getSession().setAttribute("users", users);
return "redirect:/index/index.action";
} else {
this.getSession().setAttribute("message", "密码错误");
return "redirect:/index/preLogin.action";
}
}
}

// 准备注册
@RequestMapping("preReg.action")
public String preReg() {
this.front();
return "users/register";
}

// 用户注册
@RequestMapping("register.action")
public String register(Users users) {
this.front();
Users u = new Users();
u.setUsername(users.getUsername());
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
		this.getRequest().setAttribute("topic", topic);
List<Users> usersList = this.usersService.getAllUsers();
this.getRequest().setAttribute("usersList", usersList);
List<Music> musicList = this.musicService.getAllMusic();
this.getRequest().setAttribute("musicList", musicList);
return "admin/edittopic";
}

public TopicService getTopicService() { return topicService; }

public void setTopicService(TopicService topicService) { this.topicService = topicService; }

}
//

//定义为控制器
@Controller
// 设置路径
@RequestMapping(value = "/rebbs" , produces = "text/plain;charset=utf-8")
public class RebbsController extends BaseController {
// 注入Service 由于标签的存在 所以不需要getter setter
@Autowired
private RebbsService rebbsService;
@Autowired
private UsersService usersService;
@Autowired
private BbsService bbsService;

// 准备添加数据
@RequestMapping("createRebbs.action")
public String createRebbs() {
List<Users> usersList = this.usersService.getAllUsers();
this.getRequest().setAttribute("usersList", usersList);
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
@RequestMapping("deleteArticle.action")
public String deleteArticle(String id) {
this.articleService.deleteArticle(id);
return "redirect:/article/getAllArticle.action";
}

// 批量删除数据
@RequestMapping("deleteArticleByIds.action")
public String deleteArticleByIds() {
String[] ids = this.getRequest().getParameterValues("articleid");
for (String articleid : ids) {
this.articleService.deleteArticle(articleid);
}
return "redirect:/article/getAllArticle.action";
}

// 更新数据
@RequestMapping("updateArticle.action")
public String updateArticle(Article article) {
this.articleService.updateArticle(article);
return "redirect:/article/getAllArticle.action";
}

// 显示全部数据
@RequestMapping("getAllArticle.action")
public String getAllArticle(String number) {
List<Article> articleList = this.articleService.getAllArticle();
PageHelper.getPage(articleList, "article", null, null, 10, number, this.getRequest(), null);
return "admin/listarticle";
}

// 按条件查询数据 (模糊查询)
@RequestMapping("queryArticleByCond.action")
public String queryArticleByCond(String cond, String name, String number) {
Article article = new Article();
if(cond != null){
if ("title".equals(cond)) {
article.setTitle(name);
}
if ("image".equals(cond)) {
article.setImage(name);


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