Skip to content

Commit

Permalink
Update TestController : python api get test
Browse files Browse the repository at this point in the history
  • Loading branch information
minseok128 committed Oct 9, 2024
1 parent d2c20ac commit 54bbf18
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/com/example/aneukbeserver/TestController.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.util.List;

Expand All @@ -16,6 +17,9 @@ public String test() {

@GetMapping("/test")
public List<String> test2() {
return List.of("SUCCESS?!?!?!?", "SUCCESS?!?!?!?", "WOW!!!!!?!?!?!?");
RestTemplate restTemplate = new RestTemplate();
String externalContent = restTemplate.getForObject("http://localhost:2518/test", String.class);
System.out.println(externalContent);
return List.of("sprint api content", externalContent);
}
}

0 comments on commit 54bbf18

Please sign in to comment.