Undertow技术:为什么很多SpringBoot开发者放弃了Tomcat

前言

在SpringBoot框架中,我们使用最多的是Tomcat,这是SpringBoot默认的容器技术,而且是内嵌式的Tomcat。同时,SpringBoot也支持Undertow容器,我们可以很方便的用Undertow替换Tomcat,而Undertow的性能和内存使用方面都优于Tomcat,那我们如何使用Undertow技术呢?本文将为大家细细讲解。

SpringBoot中的Tomcat容器

SpringBoot可以说是目前最火的Java Web框架了。它将开发者从繁重的xml解救了出来,让开发者在几分钟内就可以创建一个完整的Web服务,极大的提高了开发者的工作效率。Web容器技术是Web项目必不可少的组成部分,因为任Web项目都要借助容器技术来运行起来。在SpringBoot框架中,我们使用最多的是Tomcat,这是SpringBoot默认的容器技术,而且是内嵌式的Tomcat。

Undertow技术:为什么很多SpringBoot开发者放弃了Tomcat

Undertow技术:为什么很多SpringBoot开发者放弃了Tomcat

Undertow是Red Hat公司的开源产品, 它完全采用Java语言开发,是一款灵活的高性能Web服务器,支持阻塞IO和非阻塞IO。由于Undertow采用Java语言开发,可以直接嵌入到Java项目中使用。同时, Undertow完全支持Servlet和Web Socket,在高并发情况下表现非常出色。

Undertow技术:为什么很多SpringBoot开发者放弃了Tomcat

Undertow

Undertow技术:为什么很多SpringBoot开发者放弃了Tomcat

Undertow

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注