Spring RestTemplate 使用问题。

Spring RestTemplate 使用问题。
我用Spring RestTemplate 的时候如果是获取一个对象 可以用

Goods goods = restTemplate.getForObject(url, Goods.class);
但是获取一个list 或者map集合怎么弄呢?
直接漏旁取就OK.


List 返仿橡goodsList = restTemplate.getForObject(url, List.class);


参大中考: http : / /   thekspace.com/home/component/content/article/57-restful-clients-in-spring-3.html

List list = service.getList();
service中的list方法是你自己写,在dao层宏贺也要自己写闷绝没个放回list的方蚂纳法的啊
← 上一篇: 下一篇: →