Use URI#create instead of URI constructor where feasible in spring-web
This commit is contained in:
@@ -611,7 +611,7 @@ public interface RestOperations {
|
||||
* <pre class="code">
|
||||
* MyRequest body = ...
|
||||
* RequestEntity request = RequestEntity
|
||||
* .post(new URI("https://example.com/foo"))
|
||||
* .post(URI.create("https://example.com/foo"))
|
||||
* .accept(MediaType.APPLICATION_JSON)
|
||||
* .body(body);
|
||||
* ResponseEntity<MyResponse> response = template.exchange(request, MyResponse.class);
|
||||
@@ -631,7 +631,7 @@ public interface RestOperations {
|
||||
* <pre class="code">
|
||||
* MyRequest body = ...
|
||||
* RequestEntity request = RequestEntity
|
||||
* .post(new URI("https://example.com/foo"))
|
||||
* .post(URI.create("https://example.com/foo"))
|
||||
* .accept(MediaType.APPLICATION_JSON)
|
||||
* .body(body);
|
||||
* ParameterizedTypeReference<List<MyResponse>> myBean =
|
||||
|
||||
Reference in New Issue
Block a user