Commit 85a44714 authored by XCQi's avatar XCQi

模拟慢请求接口

parent 763ea95f
......@@ -18,24 +18,19 @@ public class RestApi {
@GetMapping("/hello")
public String hello(){
return "hello1";
return "hello from fast server";
}
@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("/hello2")
// public String hello2(){
// System.out.println(Thread.currentThread().getName());
// try {
// Thread.sleep(500);
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
// return "hello2";
// }
@GetMapping("/exampleforget")
public User getUser() {
......
spring.application.name=spring-cloud-server-HelloWorld
server.port=8080
server.tomcat.max-threads=10
spring.application.name=spring-cloud-server-HelloWorldFast
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