Vue向后端发生请求时出现?ec6c:177 GET http://localhost:8989/vue/user/findOne?id=9 net::ERR_CONNECTION_REF

时间:2024-11-14 19:29:16
/** * 修改用户信息 */ @PostMapping("update") public Map<String,Object> update(@RequestBody User user){ HashMap<String , Object> map = new HashMap<>(); try { userService.update(user); map.put("success", true); map.put("msg", "修改用户成功!"); } catch (Exception e) { e.printStackTrace(); map.put("success", false); map.put("msg", "修改用户失败:" + e.getMessage()); } return map; }