MCPcopy Create free account
hub / github.com/L1yp/van-app / JacksonConfig

Class JacksonConfig

src/main/java/com/l1yp/conf/JacksonConfig.java:16–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14import java.time.format.DateTimeFormatter;
15
16@Configuration
17public class JacksonConfig {
18
19 @Bean
20 public Module module() {
21 JavaTimeModule module = new JavaTimeModule();
22 module.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
23 module.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
24 module.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
25 return module;
26 }
27
28}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected