标签:http treemap new map style sys get 异常 keyset
/** * 动态遍历获取所有收到的参数,此步非常关键,因为以后可能会加字段,动态获取可以兼容由于加字段而引起的签名异常 * * @param request * @return */ private TreeMap<String, String> getParams(HttpServletRequest request) { TreeMap<String, String> map = new TreeMap<String, String>(); Map reqMap = request.getParameterMap(); for (Object key : reqMap.keySet()) { String value = ((String[]) reqMap.get(key))[0]; System.out.println(key + ";" + value); map.put(key.toString(), value); } return map; }
标签:http treemap new map style sys get 异常 keyset
原文地址:https://www.cnblogs.com/yangj-Blog/p/13161954.html