NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
``` 1. 默认情况下SpringBoot使用Tomcat作为内嵌的Servlet容器 2. Undertow是一个采用java开发的灵活的高性能web服务器,提供包括阻塞和基于NIO的非阻塞机制 3. 将Web服务器更换为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> ```