1,调取接口代码
RestTemplate restTemplate=new RestTemplate();
HttpHeaders headers=new HttpHeaders();
MultiValueMap<String,String> map=new LinkedMultiValueMap<>();
HttpEntity<MultiValueMap<String,String>> request=new HttpEntity<>(map,headers);
//ip改为第三方相关ip
ResponseEntity<String> responseEntity=restTemplate.postForEntity(127.0.0.1:8080+"/TagSystemGetUuid", request,String.class);
//第三方系统返回的数据
String id=responseEntity.getBody();
System.out.println(id);
2,第三方系统中接口代码
@RequestMapping(value = "TagSystemGetUuid",method = RequestMethod.POST)
public String TagSystemGetUuid(){
String id=utilService.getId();
return id;
}