Java 8 date/time type `java.time.LocalDateTime` not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling
I have been getting this error in my spring boot project that uses Gradle. I added the below given Gradle dependency for jsr310 as well, still it didn't work.
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.13.3'
How can I fix this error? My project uses Java 17 and Spring 2.6.7.
new ObjectMapper().registerModule(new JavaTimeModule());
Hope, this helps you.