You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RestTemplate is going to be the central class for client-side REST access. It takes the familiar pattern of JdbcTemplate, JmsTemplate, etc., and applies it to REST.
The RestTemplate is going to integrate with the OXM abstraction, to be moved over, and will have other conversion mechanisms as well.
Here is some pseudo-code code to show how it might work:
String uri = "http://example.com/hotels/{id}"
template = new RestTemplate();
HotelList result = template.getForObject(uri, HotelList.class, "1");
Booking booking = // create booking object
uri = "http://example.com/hotels/{id}/bookings";
Map<String, String> vars = Collections.singletonMap("id", "1");
URI location = template.postForLocation(uri, booking, vars);
Arjen Poutsma opened SPR-5260 and commented
RestTemplate is going to be the central class for client-side REST access. It takes the familiar pattern of JdbcTemplate, JmsTemplate, etc., and applies it to REST.
The RestTemplate is going to integrate with the OXM abstraction, to be moved over, and will have other conversion mechanisms as well.
Here is some pseudo-code code to show how it might work:
String uri = "http://example.com/hotels/{id}"
template = new RestTemplate();
HotelList result = template.getForObject(uri, HotelList.class, "1");
Booking booking = // create booking object
uri = "http://example.com/hotels/{id}/bookings";
Map<String, String> vars = Collections.singletonMap("id", "1");
URI location = template.postForLocation(uri, booking, vars);
template.delete(location.toString());
template.execute(uri, HttpMethod.GET, myRequestCallback, myResponseCallback);
This issue is a sub-task of #9097
Issue Links:
2 votes, 3 watchers
The text was updated successfully, but these errors were encountered: