/** * 将request中的参数转换成map */ public static Map<String, String> requestParamsToMap(HttpServletRequest request) { Map<String, String> reqMap = new HashMap<>(); Enumeration enu = request.getParameterNames(); while(enu.hasMoreElements()){ String name = (String)enu.nextElement(); reqMap.put(name, request.getParameter(name)); } return reqMap; }
标签:map,name,转换成,request,reqMap,enu From: https://www.cnblogs.com/sunline/p/17653007.html