Spring Boot uses Embedded Tomcat as the default web server, but it can be replaced or customized with other embedded servers such as Jetty or Undertow based on application requirements such as performance, memory usage, or asynchronous processing capabilities.
A high-concurrency real-time application may prefer Undertow because of its lightweight and non-blocking architecture, while a traditional enterprise application may continue using Tomcat.
Exclude Tomcat dependency.
Add the desired server dependency.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency><dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>Spring Boot automatically detects the available server and configures it during application startup.
Even without replacing Tomcat, we can customize it using application properties.
server.port=9090
server.tomcat.max-threads=300
server.tomcat.accept-count=100An API Gateway handling thousands of requests per second may use Undertow for better throughput, while a standard business application may continue using Tomcat due to its maturity and stability.
A concise interview answer is: Yes, Spring Boot allows replacing the default Embedded Tomcat server with Jetty or Undertow by excluding the Tomcat dependency and adding the desired server starter dependency. Spring Boot automatically configures the new server, making the transition seamless without requiring application code changes.
Last updated: 16 July 2026
Previous question: Discuss the integration of Spring Boot applications with CI/CD pipelines.
Next question: How do you fix the Whitelabel Error Page in a Spring Boot application?