get 普通请求:
restemplate.getForEntity(url,String.class).getBody();
get 导出请求:
restemplate.getForEntity(url, byte[].class);
put 请求:参数是实体类
HttpEntity<String> entity = new HttpEntity<String>(JSON.toJSON(targetDto).toString(),headers);
RestTemplate restemplate = RestTemplateHttpsUtil.restTemplate();
restemplate.exchange(url, HttpMethod.PUT,entity, Map.class);
post请求:参数是实体类
restemplate.postForEntity(url,targetDto,String.class).getBody();