I have added the JS310 dependency to Maven and refreshed the dependencies:
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.13.0</version>
</dependency>
In the domain:
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
LocalDate start;
However, I am receiving this error:
com.fasterxml.jackson.databind.exc.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
ObjectMapper mapper = new ObjectMapper(); mapper.registerModule(new JavaTimeModule());
, both methods with equivalent alternatives are present in the link. I'm seeing you are using 2.13 module, checks if this is the version you are currently using, because these are the methods from official documentation. – Pastorate