@ResponseBody @RequestMapping(value="/updateData1.do",method={RequestMethod.POST}) public Object updateData1(HttpServletRequest req) throws IOException { StringBuffer s = new StringBuffer(); BufferedReader read = req.getReader(); String input = null; //读取发过来的信息 while((input = read.readLine()) != null) { s.append(input); } System.out.println(s); //字符串转JSON对象 JSONObject jsonObj=JSONObject.fromObject(s.toString()); System.out.println(jsonObj.toString()); //JSON对象转java对象 User u = (User)JSONObject.toBean(jsonObj, User.class); System.out.println(u);