Get请求方式实践
1.getForObject
a.不带参数的get请求
public void restTemplateGetTest(){
RestTemplate restTemplate = new RestTemplate();
Notice notice = restTemplate.getForObject("http://xxx/notice/list", Notice.class);
}
b.带参数的get请求
public void restTemplateGetTest(){
RestTemplate restTemplate = new RestTemplate();
Map<String,String> map = new HashMap();
map.put("start","1");
map.put("page","5");
Notice notice = restTemplate.getForObject(