java-time: java.time on Jackson 3 vs 2, @JsonFormat, time zones, Spring Boot 4.2 spring.jackson.*

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b4HkWoC7hLzk61vZa8
This commit is contained in:
2026-12-03 23:41:03 +05:30
co-authored by Claude Sonnet 5.5
parent f5ed5d1605
commit 26f64bc184
42 changed files with 1505 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
== Jackson 2.23.0, plain ObjectMapper
InvalidDefinitionException: Java 8 date/time type `java.time.LocalDate` not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling (or disable `MapperFeature.REQUIRE_HANDLERS_FOR_JAVA8_TIMES`) (through reference chain: com.ankurm.javatime.Meeting["day"])
== Jackson 2 + JavaTimeModule
{"day":[2026,12,15],"wallClock":[2026,12,15,10,30],"createdAt":1797310800.000000000,"startsAt":1797310800.000000000,"reminderAt":1797310800.000000000}
== Jackson 3.3.0, JsonMapper.builder().build()
{"day":"2026-12-15","wallClock":"2026-12-15T10:30:00","createdAt":"2026-12-15T05:00:00Z","startsAt":"2026-12-15T10:30:00+05:30","reminderAt":"2026-12-15T10:30:00+05:30"}
registered modules : 0
read back : Meeting[day=2026-12-15, wallClock=2026-12-15T10:30, createdAt=2026-12-15T05:00:00Z, startsAt=2026-12-15T05:00Z, reminderAt=2026-12-15T05:00Z]
present : com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
absent : tools.jackson.datatype.jsr310.JavaTimeModule
present : tools.jackson.databind.ext.javatime.JavaTimeInitializer
present : tools.jackson.databind.ext.javatime.ser.InstantSerializer