Map<String,Object> params = new HashMap<String, Object>(); BufferedReader br; try { br = httpServletRequest.getReader(); String str, wholeParams = ""; while((str = br.readLine()) != null){ wholeParams += str; } if(!StringUtils.isEmpty(wholeParams)){ System.out.println(wholeParams); params = JSONUtil.toBean(wholeParams, Map.class); } } catch (IOException e) { //logger.error("",e); }
HttpServletRequest获取body体中的参数
最新推荐文章于 2025-04-11 17:35:50 发布