提取对象数组里面的某个字段 List<String> lastTask = lastTasks.stream() .map(HistoricActivityInstance::getActivityId) .limit(1) .collect(Collectors.toList()); 对象数组排序 notEmptyList.sort(Comparator.comparing(StationQueryVO::getCurrentValue).reversed()); base64 private static final org.apache.commons.codec.binary.Base64 base64 = new org.apache.commons.codec.binary.Base64();
fastjson解析null值问题: 解决 null的属性不显示问题
JSONObject.toJSONString(jsonMap,SerializerFeature.WriteMapNullValue);