Closed
Description
Craig Walls opened SPR-8263 and commented
With RestTemplate's methods, it is possible to request an object of a specific type...e.g.:
Foo foo = restTemplate.getForObject("some uri", Foo.class);
But if I want to retrieve a list of Foos, this won't work:
List<Foo> foos = restTemplate.getForObject("some uri", List.class);
Because there's no way to specify the type of the List to return, I get back a List of Map instead. It'd be nice if there was a way to specify the List's generic type so that I can get back a List<Foo> and not have to extract Foo objects from Map objects.
1 votes, 4 watchers