提交 a76bbae5 编写于 作者: A Arjen Poutsma

Javadoc

上级 428499a3
......@@ -468,7 +468,7 @@ public interface RestOperations {
* with the static builder methods on {@code RequestEntity}, for instance:
* <pre class="code">
* MyRequest body = ...
* RequestEntity request = RequestEntity.post(&quot;http://example.com/{foo}&quot;, &quot;bar&quot;).accept(MediaType.APPLICATION_JSON).body(body);
* RequestEntity request = RequestEntity.post(new URI(&quot;http://example.com/foo&quot;).accept(MediaType.APPLICATION_JSON).body(body);
* ResponseEntity&lt;MyResponse&gt; response = template.exchange(request, MyResponse.class);
* </pre>
* @param requestEntity the entity to write to the request
......@@ -484,7 +484,7 @@ public interface RestOperations {
* {@link ParameterizedTypeReference} is used to pass generic type information:
* <pre class="code">
* MyRequest body = ...
* RequestEntity request = RequestEntity.post(&quot;http://example.com/{foo}&quot;, &quot;bar&quot;).accept(MediaType.APPLICATION_JSON).body(body);
* RequestEntity request = RequestEntity.post(new URI(&quot;http://example.com/foo&quot;).accept(MediaType.APPLICATION_JSON).body(body);
* ParameterizedTypeReference&lt;List&lt;MyResponse&gt;&gt; myBean = new ParameterizedTypeReference&lt;List&lt;MyResponse&gt;&gt;() {};
* ResponseEntity&lt;List&lt;MyResponse&gt;&gt; response = template.exchange(request, myBean);
* </pre>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册