Ver código fonte

设置 websocket 默认 buffer 为 64 KiB

reghao 2 dias atrás
pai
commit
f7b5741405

+ 2 - 7
mgr/src/main/java/cn/reghao/devops/mgr/MgrApplication.java

@@ -4,15 +4,10 @@ import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 
 @SpringBootApplication
-/*@ComponentScan(basePackages = {"cn.reghao.devops.mgr"}
-        ,excludeFilters = @ComponentScan.Filter(type = FilterType.REGEX, pattern = {
-                "cn.reghao.devops.mgr.console.*"
-        })
-)*/
 public class MgrApplication {
     public static void main(String[] args) {
-        // 设置 websocket 默认 buffer 字节大小(1 MB)
-        System.setProperty("org.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE", "1024000");
+        // 设置 websocket 默认 buffer 字节大小(64 KiB)
+        System.setProperty("org.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE", "65536");
         SpringApplication.run(MgrApplication.class, args);
     }
 }