In a spring boot 2.2.2, java 11 a object is received via Ibm mq.
Object received have LocalDate data type.
Project have spring-boot-starter-web starter in maven.
I see theses jar in the project
jackson datatype -jdk 8-2.10.1 jackson-datatype-jsr310-2.10.1
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class BillingEvent {
public Long Id;
public LocalDate billingCreatedDate;
}
In my properties I have
spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false
Error I get
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of
java.time.LocalDate
(no Creators, like default construct, exist): no String-argument constructor/factory method to deserialize from String value ('2019-09-02')