From bd7371fb8b7459a5253fa8618ea1553dadd9e320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Thu, 19 Mar 2020 09:21:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=20v2.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi/pom.xml | 12 ++++++++++++ ruoyi/src/main/resources/application.yml | 19 +++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/ruoyi/pom.xml b/ruoyi/pom.xml index 851b9266..bd5885cf 100644 --- a/ruoyi/pom.xml +++ b/ruoyi/pom.xml @@ -45,6 +45,18 @@ org.springframework.boot spring-boot-starter + + + spring-boot-starter-tomcat + org.springframework.boot + + + + + + + org.springframework.boot + spring-boot-starter-undertow diff --git a/ruoyi/src/main/resources/application.yml b/ruoyi/src/main/resources/application.yml index 2a7fa6a3..e0ba64fa 100644 --- a/ruoyi/src/main/resources/application.yml +++ b/ruoyi/src/main/resources/application.yml @@ -20,14 +20,17 @@ server: servlet: # 应用的访问路径 context-path: / - tomcat: - # tomcat的URI编码 - uri-encoding: UTF-8 - # tomcat最大线程数,默认为200 - max-threads: 800 - # Tomcat启动初始化的线程数,默认值25 - min-spare-threads: 30 - version: 2.2.0 + undertow: + # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程 + io-threads: 8 + # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载 + worker-threads: 256 + # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理 + # 每块buffer的空间大小,越小的空间被利用越充分 + buffer-size: 512 + # 是否分配的直接内存 + direct-buffers: true + # 日志配置 logging: level: