List转string 字符串,用逗号分隔。仅用于List是基本数字类型+String
1、将list转化为逗号分割的字符串
String str = String.join(",", list);
String str = StringUtils.json(list.toArray(), ",");
2、将逗号分隔的字符串转换为List
List<String> list = Arrays.asList(str.split(","));
List<String> list = Arrays.asList(StringUtils.split(str, ","));
转载:https://blog.csdn.net/qq_27327261/article/details/134580779
下班记得打卡