springboot2整合vue开发在线音乐网站系统设计
springboot+vue的前后端分离项目
后台主要分为:用户管理、歌手管理、歌单管理
用户在前端可以搜索歌曲名字、播放歌曲(如果上传了歌词,点击歌曲图片,可以显示歌词),可以评论歌曲,给歌曲评分等
用户还可以设置自己的信息,上传头像。
不过,歌曲取消收藏模块有点问题
运行环境
jdk7(8)+mysql+IntelliJ IDEA+maven
项目技术(必填)
springboot+vue+mybatis
package com.example.demo.controller; import com.alibaba.fastjson.JSONObject; import com.example.demo.service.impl.AdminServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; @RestController @Controller public class AdminController { @Autowired private AdminServiceImpl adminService; // 判断是否登录成功 @ResponseBody @RequestMapping(value = "/admin/login/status", method = RequestMethod.POST) public Object loginStatus(HttpServletRequest req, HttpSession session){ JSONObject jsonObject = new JSONObject(); String name = req.getParameter("name"); String password = req.getParameter("password"); boolean res = adminService.veritypasswd(name, password); if (res) { jsonObject.put("code", 1); jsonObject.put("msg", "登录成功"); session.setAttribute("name", name); return jsonObject; } else { jsonObject.put("code", 0); jsonObject.put("msg", "用户名或密码错误"); return jsonObject; } } }