Commit 763ea95f authored by XCQi's avatar XCQi

模拟慢请求

parent 6e4d272b
......@@ -13,7 +13,28 @@ public class RestApi {
@RequestMapping("/")
public String home() {
return "hello world.";
return "hello world form server No.1";
}
@GetMapping("/hello")
public String hello(){
return "hello1";
}
@GetMapping("/hello1")
public String hello1(){
return "hello1";
}
@GetMapping("/hello2")
public String hello2(){
System.out.println(Thread.currentThread().getName());
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
return "hello2";
}
@GetMapping("/exampleforget")
......
spring.application.name=spring-cloud-server-HelloWorld
management.endpoint.health.show-details=always
eureka.client.service-url.defaultZone=http://localhost:8761/eureka/
eureka.client.healthcheck.enabled=true
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment