1、ObjectMapper 设置LocalDateTime格式
ObjectMapper objectMapper = new ObjectMapper ();
JavaTimeModule javaTimeModule = new JavaTimeModule();
//序列化时间格式化
javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy/MM/dd'T'HH:mm:ss")));
//反序列化时间格式化
javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy/MM/dd'T'HH:mm:ss")));
//为jackjson注册序列化时间
objectMapper.registerModule(javaTimeModule);