后端使用key-value形式接收前端传来的LocalDateTime,则添加@DateTimeFormat注解
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
后端使用json形式接收前端传来的LocalDateTime,则添加下面的@JsonFormat注释
同时后端返回给前端的json中带有LocalDateTime的话,也添加@JsonFormat注解
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")