Skip to content

Commit dc14710

Browse files
authored
Updated port number
1 parent 1c03ee9 commit dc14710

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎spring-rest/src/main/java/com/baeldung/web/upload/client/MultipartFileUploadClient.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private static void uploadSingleFile() throws IOException {
3030

3131

3232
HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(body, headers);
33-
String serverUrl = "http://localhost:8080/fileserver/singlefileupload/";
33+
String serverUrl = "http://localhost:8082/fileserver/singlefileupload/";
3434
RestTemplate restTemplate = new RestTemplate();
3535
ResponseEntity<String> response = restTemplate.postForEntity(serverUrl, requestEntity, String.class);
3636
System.out.println("Response code: " + response.getStatusCode());
@@ -46,7 +46,7 @@ private static void uploadMultipleFile() throws IOException {
4646
body.add("files", getTestFile());
4747

4848
HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(body, headers);
49-
String serverUrl = "http://localhost:8080/fileserver/multiplefileupload/";
49+
String serverUrl = "http://localhost:8082/fileserver/multiplefileupload/";
5050
RestTemplate restTemplate = new RestTemplate();
5151
ResponseEntity<String> response = restTemplate.postForEntity(serverUrl, requestEntity, String.class);
5252
System.out.println("Response code: " + response.getStatusCode());
@@ -58,4 +58,4 @@ public static Resource getTestFile() throws IOException {
5858
Files.write(testFile, "Hello World !!, This is a test file.".getBytes());
5959
return new FileSystemResource(testFile.toFile());
6060
}
61-
}
61+
}

0 commit comments

Comments
 (0)