举例,将map的首字母小写 HashMap<String, String> posNoticesMap = new HashMap<>(); posNoticesMap.put("SDSD","sdsad"); Map<String, String> newMap = posNoticesMap.entrySet().stream().collect(Collectors.toMap(entry -> StringUtils.uncapitalize(entry.getKey()), entry -> entry.getValue()));