| 14 | import java.time.format.DateTimeFormatter; |
| 15 | |
| 16 | @Configuration |
| 17 | public 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected