We can use the Netflix Zuul to balance the server-side load by utilizing Spring Cloud. It is also known as a JVM-based router.
xxxxxxxxxx
@RestController
public class TestController {
@GetMapping("/test")
public String test() {
String url = "http://localhost:8088" + "/client2";
System.out.println(url);
String response = new RestTemplate().getForObject(url, String.class);
return response;
}
}