Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
SpringCloudServer
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiachenqi
SpringCloudServer
Commits
85a44714
Commit
85a44714
authored
Jul 12, 2019
by
XCQi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模拟慢请求接口
parent
763ea95f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
17 deletions
+15
-17
RestApi.java
...ava/com/yingxin/springcloudserver/controller/RestApi.java
+11
-16
application.properties
src/main/resources/application.properties
+4
-1
No files found.
src/main/java/com/yingxin/springcloudserver/controller/RestApi.java
View file @
85a44714
...
...
@@ -18,24 +18,19 @@ public class RestApi {
@GetMapping
(
"/hello"
)
public
String
hello
(){
return
"hello
1
"
;
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
()
{
...
...
src/main/resources/application.properties
View file @
85a44714
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment