How to format date using Locale with Jackson and Spring Boot

Viewed 696

I have a Spring Boot Application which sends GET messages to the other serivce and gets JSON, in which one of his fields is like this: 2014-11-07T22:01:45Z

How to format this date with requester Locale? The method I use is as below:

ResponseEntity<Repository> response = restTemplate.exchange(repoUrlBuilder(owner, repository_name), HttpMethod.GET, entity, Repository.class);

Repository date field is as below:

@JsonProperty(value="created_at")
Date createdAt;

Static defined format in JsonProperty annotation is not a solution.

0 Answers
Related