diff --git a/README.md b/README.md index ec00f984..46d7c7e5 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,15 @@ ### 简介 -ContiNew-Admin (incubating) 中后台管理框架,Continue New Admin,持续以最新流行技术栈构建。当前阶段采用的技术栈:Spring Boot 等。 +ContiNew-Admin (incubating) 中后台管理框架,Continue New Admin,持续以最新流行技术栈构建。当前阶段采用的技术栈:Spring Boot、Undertow 等。 ### 技术栈 -| 名称 | 版本 | 简介 | -| ----------------------------------------------------- | ------- | ------------------------------------------------------------ | -| [Spring Boot](https://spring.io/projects/spring-boot) | 2.7.6 | 简化新 Spring 应用的初始搭建以及开发过程。 | -| [Lombok](https://projectlombok.org/) | 1.18.24 | 在 Java 开发过程中用注解的方式,简化了 JavaBean 的编写,避免了冗余和样板式代码,让编写的类更加简洁。 | +| 名称 | 版本 | 简介 | +| ----------------------------------------------------- | ------------ | ------------------------------------------------------------ | +| [Spring Boot](https://spring.io/projects/spring-boot) | 2.7.6 | 简化新 Spring 应用的初始搭建以及开发过程。 | +| [Undertow](https://undertow.io/) | 2.2.20.Final | 采用 Java 开发的灵活的高性能 Web 服务器,提供包括阻塞和基于 NIO 的非堵塞机制。 | +| [Lombok](https://projectlombok.org/) | 1.18.24 | 在 Java 开发过程中用注解的方式,简化了 JavaBean 的编写,避免了冗余和样板式代码,让编写的类更加简洁。 | ### License diff --git a/pom.xml b/pom.xml index 53df4ff0..2c275ed8 100644 --- a/pom.xml +++ b/pom.xml @@ -33,6 +33,26 @@ org.springframework.boot spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-tomcat + + + + + + + org.springframework.boot + spring-boot-starter-undertow + + + + io.undertow + undertow-websockets-jsr + + diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index e34adaf4..91538e7c 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -20,6 +20,20 @@ server: servlet: # 应用访问路径 context-path: / + ## Undertow 服务器配置 + undertow: + # HTTP POST 请求内容的大小上限(默认 -1 不限制) + max-http-post-size: -1 + # 以下的配置会影响 buffer,这些 buffer 会用于服务器连接的 IO 操作,有点类似 Netty 的池化内存管理 + # 每块 buffer的空间大小(越小的空间被利用越充分,不要设置太大,以免影响其他应用,合适即可) + buffer-size: 512 + # 是否分配的直接内存(NIO 直接分配的堆外内存) + direct-buffers: true + threads: + # 设置 IO 线程数,它主要执行非阻塞的任务,它们会负责多个连接(默认每个 CPU 核心一个线程) + io: 8 + # 阻塞任务线程池,当执行类似 Servlet 请求阻塞操作,Undertow 会从这个线程池中取得线程(它的值设置取决于系统的负载) + worker: 256 --- ### Spring 配置 spring: