升级 v2.2

This commit is contained in:
疯狂的狮子li 2020-03-19 09:21:17 +08:00
parent 51ae2d1a87
commit bd7371fb8b
2 changed files with 23 additions and 8 deletions

View File

@ -45,6 +45,18 @@
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId> <artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<artifactId>spring-boot-starter-tomcat</artifactId>
<groupId>org.springframework.boot</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- web 容器使用 undertow 性能更强 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency> </dependency>
<!-- SpringBoot 测试 --> <!-- SpringBoot 测试 -->

View File

@ -20,14 +20,17 @@ server:
servlet: servlet:
# 应用的访问路径 # 应用的访问路径
context-path: / context-path: /
tomcat: undertow:
# tomcat的URI编码 # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
uri-encoding: UTF-8 io-threads: 8
# tomcat最大线程数默认为200 # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
max-threads: 800 worker-threads: 256
# Tomcat启动初始化的线程数默认值25 # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
min-spare-threads: 30 # 每块buffer的空间大小,越小的空间被利用越充分
version: 2.2.0 buffer-size: 512
# 是否分配的直接内存
direct-buffers: true
# 日志配置 # 日志配置
logging: logging:
level: level: