- 博客(6)
- 收藏
- 关注
原创 Java字符串拼接写法 joiner.on
写法一: String value=Joiner.on("->").join(list); 写法二:String result = list.stream().collect(Collectors.joining("_"));
2021-07-15 10:03:19
203
原创 对list<T>排序
//根据对象中某个字段进行正序排序 result.sort(Comparator.comparing(MembershipChannel::getTotal)); //把List 倒叙 Collections.reverse(result);
2021-06-03 15:18:43
124
原创 LinkedMultiValueMap的使用
Spring的内部实现是LinkedMultiValueMap ,即一个键对应多个值 添加一个Key对应一个Value的:void add(K, V); 添加一个Key对应多个Value的:void add(K, List); 设置一个Key对应一个Value的:void set(K, V); 设置一个Key对应多个Value的:void set(K, List); 移除一个Key和它对应的Value:List remove(K); 清除所有Value的:void clear(); 拿到所有Key的集合:S
2021-02-02 16:49:41
558
原创 查询mysql数据库时 条件字段为null
查询mysql数据库时 条件字段为null 正确的写法为 selectfrom tablename where isNULL(字段) selectfrom tablename where not isNULL(字段) 而不是 select*from tablename where 字段=NULL
2020-12-18 16:11:01
428
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人