String uriTemplate =
"http://www.baidu.com"
;
URI uri = UriComponentsBuilder.fromUriString(uriTemplate).build().toUri();
RequestDO requestDO =
new
RequestDO();
requestDO.setProcessInstanceId(String.valueOf(
"1111"
));
String s = JSON.toJSONString(requestDO);
RequestEntity<String> requestEntity = RequestEntity.post(uri)
.accept(MediaType.APPLICATION_JSON)
.header(
"Content-Type"
,
"application/json"
)
.body(s);
ResponseEntity<String> exchange = template.exchange(requestEntity, String.class);
String body = exchange.getBody();
System.out.println(JSON.parseObject(body).toJSONString());
Mr_Morning
后台工程师
68.1k
粉丝