I am trying to set the current date in my domain class with this code
private LocalDate createdUTC = LocalDate.now(Clock.systemUTC());
I do not have any setter for this property only getter. When I send a request through RestTemplate to my controller I get this error
{
"responseCode": 500,
"responseText": "Could not read document: Can not construct instance of java.time.LocalDateTime: no suitable constructor found, can not deserialize from Object value (missing default constructor or creator, or perhaps need to add/enable type information?)\n at [Source: java.io.PushbackInputStream@6bde8de2; line: 1, column: 352] (through reference OrganizationResponse[\"createdUTC\"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of java.time.LocalDateTime: no suitable constructor found, can not deserialize from Object value (missing default constructor or creator, or perhaps need to add/enable type information?)\n at [Source: java.io.PushbackInputStream@6bde8de2; line: 1, column: 352] (through reference chain: OrganizationResponse[\"createdUTC\"])"
}