When I make a request to a service containing java.util.Date with FeignClient, I get this error: org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: java.time.format.DateTimeParseException: Text '1692738000000' could not be parsed at index 0

My dto:

public class InputDto {
    private Date startDate;
    private Date endDate;
}

FeignClient service:

@PostMapping(value = {"/searchFile"}, produces = {MediaType.APPLICATION_JSON_VALUE})
ResponseEntity<ServiceResponse<List<FileDto>>> searchFile(@RequestBody InputDto searchDto);
<spring-boot.version>2.7.4</spring-boot.version>
<spring-cloud-starter-openfeign.version>3.1.5</spring-cloud-starter-openfeign.version>

If I define my variables as java.time.LocalDate I don't get an error. why does this problem occur?

Comment From: OlgaMaciaszek

Hello @zoroglu. I was not able to reproduce this issue (see a working sample).
Please provide a minimal, complete, verifiable example that reproduces the issue.

Comment From: spring-cloud-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-cloud-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.