Forráskód Böngészése

springboot 应用启用 Virtual Threads

reghao 1 hónapja
szülő
commit
b168a12732

+ 3 - 0
account/account-service/src/main/resources/application.yml

@@ -22,6 +22,9 @@ server:
         # 两个请求间隔的最大时间, 超过此时间则会话过期
       timeout: 10m
 spring:
+  threads:
+    virtual:
+      enabled: true
   application:
     name: account-service
   profiles:

+ 3 - 0
admin/src/main/resources/application.yml

@@ -14,6 +14,9 @@ server:
         # 两个请求间隔的最大时间, 超过此时间则会话过期
       timeout: 10m
 spring:
+  threads:
+    virtual:
+      enabled: true
   application:
     name: admin-service
   profiles:

+ 3 - 0
content/content-service/src/main/resources/application.yml

@@ -14,6 +14,9 @@ server:
   tomcat:
     max-http-form-post-size: 4MB
 spring:
+  threads:
+    virtual:
+      enabled: true
   application:
     name: content-service
   profiles:

+ 3 - 0
data/data-service/src/main/resources/application.yml

@@ -1,6 +1,9 @@
 server:
   port: 6006
 spring:
+  threads:
+    virtual:
+      enabled: true
   application:
     name: data-service
   profiles:

+ 3 - 0
file/file-service/src/main/resources/application.yml

@@ -14,6 +14,9 @@ server:
   tomcat:
     max-http-form-post-size: 4MB
 spring:
+  threads:
+    virtual:
+      enabled: true
   servlet:
     multipart:
       max-request-size: 1GB

+ 3 - 0
gateway/src/main/resources/application.yml

@@ -1,6 +1,9 @@
 server:
   port: 6000
 spring:
+  threads:
+    virtual:
+      enabled: true
   application:
     name: gateway
   profiles:

+ 3 - 0
message/message-service/src/main/resources/application.yml

@@ -12,6 +12,9 @@ dubbo:
 server:
   port: 6002
 spring:
+  threads:
+    virtual:
+      enabled: true
   application:
     name: message-service
   profiles:

+ 3 - 0
search/search-service/src/main/resources/application.yml

@@ -1,4 +1,7 @@
 spring:
+  threads:
+    virtual:
+      enabled: true
   application:
     name: search-service
   profiles:

+ 3 - 0
user/user-service/src/main/resources/application.yml

@@ -14,6 +14,9 @@ server:
   tomcat:
     max-http-form-post-size: 4MB
 spring:
+  threads:
+    virtual:
+      enabled: true
   application:
     name: user-service
   profiles: