/** * /api/vue/blog/list */ @ResponseBody @RequestMapping("/list") @CrossOrigin public Map<String, Object> list(HttpServletRequest request , HttpSession session )throws Exception { StringBuffer sb = new StringBuffer(); InputStream is = request.getInputStream(); InputStreamReader isr = new InputStreamReader(is, "UTF-8"); BufferedReader br = new BufferedReader(isr ); String s = ""; while ((s = br.readLine()) != null) { sb.append(s); } String result1 = sb.toString(); System.out.println(result1); JSONObject obj = JSONObject.fromObject(result1); Member member = new Member(); member.setId(obj.getInt("id")); Map<String, Object> map = new HashMap<String, Object>(); map.put("member", member); List<Blog> blogList = blogService.list(map , 0, 500); map.clear(); map.put("blogList", blogList); map.put("success", true); return map; }
站长微信:xiaomao0055
站长QQ:14496453