I dont see you taking use of the Event and Location objects in the 2nd code frame.
You just download the resource and parse them to String with the help of RestTemplate. Later on u parse the String "event" into a JSON object afterwards which apparently doesnt correspond to your Event and Location objects.
You also dont need tosince only use the StringMessageConverter.Code:messageConverters.add(new MappingJacksonHttpMessageConverter());


Reply With Quote