首頁>技術>

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@Controllerpublic 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;        }    }}

15
  • BSA-TRITC(10mg/ml) TRITC-BSA 牛血清白蛋白改性標記羅丹明
  • Elasticsearch最佳實踐總結-32條有用的建議