// 定义日期格式标签:补零,定义,parseDefaulting,ChronoField,MONTH,格式,formatter From: https://www.cnblogs.com/wawaFish666/p/18085091
DateTimeFormatter formatter = new DateTimeFormatterBuilder()
.appendPattern("yyyy-M-d")
.parseDefaulting(ChronoField.MONTH_OF_YEAR, 1)
.parseDefaulting(ChronoField.DAY_OF_MONTH, 1)
.toFormatter();
// 将List<String>转换为List<LocalDate>
List<LocalDate> localDateList = date.stream()
.map(str -> LocalDate.parse(str, formatter))
.collect(Collectors.toList());