import org.apache.commons.io.IOUtils; import javax.servlet.ServletInputStream; @RequestMapping("/sendMsg.mob") @ResponseBody public String sendMsg(HttpServletRequest request) { ServletInputStream inputStream = null; String param = ""; try { // 获取请求输入流 inputStream = request.getInputStream(); //将请求信息转换为字符串 param = IOUtils.toString(inputStream, "UTF-8"); } catch (IOException e2) { e2.printStackTrace(); } return ""; }
原文地址:https://www.cnblogs.com/fangwu/p/9367413.html
时间: 2024-11-13 10:00:11