controller 接口写法

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 ""; }

 

posted @ 2018-07-25 17:57  方方方方方方  阅读(1577)  评论(0编辑  收藏  举报