How do I update RestTemplate to correctly map Java Dates?
问题 I have an issue where my RestTemplate.postForEntity(url, restRequest, RepoResponse.class) call is failing because it can't deserialise dates of the form: 2019-02-01T12:00:00.000-0500 because of the missing colon in the timezone. Based on this answer, it looks like I want to change the date formatting of my RestTemplate 's ObjectMapper . I've tried a solution here: https://stackoverflow.com/a/38286322/14250 Which gives me the following code: restTemplate = new RestTemplate(); ObjectMapper