——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Node.js≥14
开发工具
后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可
❗没学过node.js的不要搞前后端分离项目
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明









基于javaweb的SpringBoot音乐倾听管理系统(java+springboot+vue+elementui+layui+mysql)
项目介绍
基于SpringBoot Vue音乐网站管理系统
在线音乐网站,分为客户端和管理端
音乐播放 – 用户登录注册 – 用户信息编辑、头像修改 – 歌曲、歌单搜索 – 歌单打分 – 歌单、歌曲评论 – 歌单列表、歌手列表分页显示 – 歌词同步显示 – 音乐收藏、下载、拖动控制、音量控制 – 后台对用户、歌曲、歌手、歌单信息的管理
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 4.数据库:MySql 5.7/8.0版本均可; 5.是否Maven项目:是;
技术栈
后端:SpringBoot+Mybaits 前端:layui+Vue+ELementUI
使用说明
项目运行: 1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中application.yml配置文件中的数据库配置改为自己的配置; 4. 运行项目,控制台提示运行成功后再去运行前端项目; 5. 管理员用户名密码:admin/admin 普通用户名密码:user/123456
文档系统介绍(研究背景、音乐播放及音乐推荐平台系统的现状、系统的技术架构、论文框架、系统需求分析、系统概述、系统功能需求、系统用例图、技术平台、SSM、HTML5、CSS、JavaScript、Mysql介绍、系统设计、系统总体设计、系统业务流程图、系统详情设计、系统功能详解、用户功能模块、管理员功能模块):
首页详情介绍、歌单、歌手、我的音乐进行模糊搜索,展现列表:
歌单详情介绍展示:
歌手详情介绍:
流行音乐排行榜:
我得音乐歌单展示:
音乐后台管理登录:
后台管理-用户管理、歌手管理、歌单管理:
歌手管理详情介绍:
——————————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
| }
@ResponseBody @RequestMapping(value = "/user/update", method = RequestMethod.POST) public Object updateUserMsg(HttpServletRequest req) { JSONObject jsonObject = new JSONObject(); String id = req.getParameter("id").trim(); String username = req.getParameter("username").trim(); String password = req.getParameter("password").trim(); String sex = req.getParameter("sex").trim(); String phone_num = req.getParameter("phone_num").trim(); String email = req.getParameter("email").trim(); String birth = req.getParameter("birth").trim(); String introduction = req.getParameter("introduction").trim(); String location = req.getParameter("location").trim();
if (username.equals("") || username == null) { jsonObject.put("code", 0); jsonObject.put("msg", "用户名或密码错误"); return jsonObject; } Consumer consumer = new Consumer(); DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); Date myBirth = new Date(); try { myBirth = dateFormat.parse(birth); } catch (Exception e) { e.printStackTrace(); } consumer.setId(Integer.parseInt(id)); consumer.setUsername(username); consumer.setPassword(password); consumer.setSex(new Byte(sex)); consumer.setPhoneNum(phone_num); consumer.setEmail(email); consumer.setBirth(myBirth); consumer.setIntroduction(introduction); consumer.setLocation(location);
consumer.setUpdateTime(new Date());
boolean res = consumerService.updateUserMsg(consumer); if (res) {
|
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
| String id = req.getParameter("id").trim(); String song_id = req.getParameter("songId").trim(); String song_list_id = req.getParameter("songListId").trim();
ListSong listsong = new ListSong(); listsong.setId(Integer.parseInt(id)); listsong.setSongId(Integer.parseInt(song_id)); listsong.setSongListId(Integer.parseInt(song_list_id));
boolean res = listSongService.updateListSongMsg(listsong); if (res){ jsonObject.put("code", 1); jsonObject.put("msg", "修改成功"); return jsonObject; }else { jsonObject.put("code", 0); jsonObject.put("msg", "修改失败"); return jsonObject; } } }
@RestController @Controller public class RankController {
@Autowired private RankServiceImpl rankService;
@ResponseBody @RequestMapping(value = "/rank/add", method = RequestMethod.POST) public Object addRank(HttpServletRequest req){ JSONObject jsonObject = new JSONObject(); String songListId = req.getParameter("songListId").trim();
|
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
| jsonObject.put("msg", "上传成功"); return jsonObject; } else { jsonObject.put("code", 0); jsonObject.put("msg", "上传失败"); return jsonObject; } } catch (IOException e) { jsonObject.put("code", 0); jsonObject.put("msg", "上传失败" + e.getMessage()); return jsonObject; } finally { return jsonObject; } } }
@RestController @Controller public class ConsumerController {
@Autowired private ConsumerServiceImpl consumerService;
@ResponseBody @RequestMapping(value = "/user/add", method = RequestMethod.POST) public Object addUser(HttpServletRequest req) { JSONObject jsonObject = new JSONObject(); String username = req.getParameter("username").trim(); String password = req.getParameter("password").trim(); String sex = req.getParameter("sex").trim(); String phone_num = req.getParameter("phone_num").trim();
|
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
| Consumer consumer = new Consumer(); DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); Date myBirth = new Date(); try { myBirth = dateFormat.parse(birth); } catch (Exception e) { e.printStackTrace(); } consumer.setId(Integer.parseInt(id)); consumer.setUsername(username); consumer.setPassword(password); consumer.setSex(new Byte(sex)); consumer.setPhoneNum(phone_num); consumer.setEmail(email); consumer.setBirth(myBirth); consumer.setIntroduction(introduction); consumer.setLocation(location);
consumer.setUpdateTime(new Date());
boolean res = consumerService.updateUserMsg(consumer); if (res) { jsonObject.put("code", 1); jsonObject.put("msg", "修改成功"); return jsonObject; } else { jsonObject.put("code", 0); jsonObject.put("msg", "修改失败"); return jsonObject; } }
@ResponseBody @RequestMapping(value = "/user/avatar/update", method = RequestMethod.POST) public Object updateUserPic(@RequestParam("file") MultipartFile avatorFile, @RequestParam("id") int id) { JSONObject jsonObject = new JSONObject();
if (avatorFile.isEmpty()) { jsonObject.put("code", 0); jsonObject.put("msg", "文件上传失败!"); return jsonObject; } String fileName = System.currentTimeMillis() + avatorFile.getOriginalFilename(); String filePath = System.getProperty("user.dir") + System.getProperty("file.separator") + "avatorImages"; File file1 = new File(filePath); if (!file1.exists()) { file1.mkdir();
|
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
| jsonObject.put("msg", "修改成功"); return jsonObject; } else { jsonObject.put("code", 0); jsonObject.put("msg", "修改失败"); return jsonObject; } }
@ResponseBody @RequestMapping(value = "/song/img/update", method = RequestMethod.POST) public Object updateSongPic(@RequestParam("file") MultipartFile urlFile, @RequestParam("id") int id) { JSONObject jsonObject = new JSONObject();
if (urlFile.isEmpty()) { jsonObject.put("code", 0); jsonObject.put("msg", "音乐上传失败!"); return jsonObject; } String fileName = System.currentTimeMillis() + urlFile.getOriginalFilename(); String filePath = System.getProperty("user.dir") + System.getProperty("file.separator") + "img" + System.getProperty("file.separator") + "songPic"; File file1 = new File(filePath); if (!file1.exists()) { file1.mkdir(); }
File dest = new File(filePath + System.getProperty("file.separator") + fileName); String storeUrlPath = "/img/songPic/" + fileName; try { urlFile.transferTo(dest); Song song = new Song(); song.setId(id); song.setPic(storeUrlPath); boolean res = songService.updateSongPic(song); if (res) { jsonObject.put("code", 1); jsonObject.put("avator", storeUrlPath); jsonObject.put("msg", "上传成功"); return jsonObject; } else { jsonObject.put("code", 0); jsonObject.put("msg", "上传失败"); return jsonObject; } } catch (IOException e) { jsonObject.put("code", 0); jsonObject.put("msg", "上传失败" + e.getMessage()); return jsonObject; } finally { return jsonObject;
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=351524190701201kq
https://javayms.pages.dev?id=351524190701201kq