java常用知识
提取对象数组里面的某个字段

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);  

 

posted on 2023-08-24 09:24  james-roger  阅读(5)  评论(0编辑  收藏  举报