如何在restemplate参数中发送localdate

egdjgwm8  于 2021-07-24  发布在  Java
关注(0)|答案(0)|浏览(226)

在下面我用 String 名为的参数 "samana" ```
String samana= "000ABC";

RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = new HttpHeaders();
HttpEntity requestEntity = new HttpEntity(null, headers);

Table res = restTemplate
.exchange("http://localhost:8090/tharindu/findAllComputers?saman=").concat(samana), HttpMethod.GET, requestEntity, Table.class)
.getBody();

如何在restemplate webservice中传递localdate参数

LocalDate samana = LocalDate.now();

RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = new HttpHeaders();
HttpEntity requestEntity = new HttpEntity(null, headers);

Table res = restTemplate
.exchange("http://localhost:8090/tharindu/findAllComputers?saman=").concat(samana), HttpMethod.GET, requestEntity, Table.class)
.getBody();

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题