/** * 获取请求体内容 * @param request * @return */ private String getBody(HttpServletRequest request) { BufferedReader reader; String body = ""; try { reader = request.getReader(); String line; StringBuffer inputString = new StringBuffer(); while ((line = reader.readLine()) != null) { inputString.append(line); } body = inputString.toString(); } catch (IOException e) { e.printStackTrace(); } return body; }