怎么在SpringMvc拦截器或者request中取得前端传递过来的Json数据
2个回答
2017-10-25
展开全部
public String readJSONString(HttpServletRequest request){ StringBuffer json = new StringBuffer(); String line = null; try { BufferedReader reader = request.getReader(); while((line = reader.readLine()) != null) { json.append(line); } } catch(Exception e) { System.out.println(e.toString());
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询