随着微服务的兴起,越来越多的互联网应用在选择web容器时使用更加轻量的undertow,今天小编就来说说关于springboottomcat详解?下面更多详细答案一起来看看吧!

springboottomcat详解(SpringBoot移除默认的Tomcat改用undertow)

springboottomcat详解

随着微服务的兴起,越来越多的互联网应用在选择web容器时使用更加轻量的undertow。

SpringBoot默认使用的容器是tomcat,如果想换成undertow容器,只需修改pom.xml文件

修改如下:

<!-- 移除tomcat 改用 undertow--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-undertow</artifactId> </dependency>

,