Spring Boot provides built-in embedded web servers that allow applications to run independently without requiring deployment to an external application server. These servers are packaged with the application and start automatically when the application launches. By default, Spring Boot uses Apache Tomcat as its embedded server.
Why Are Embedded Servers Important?
Spring Boot simplifies this process by embedding the server inside the application itself.
Application
|
Embedded Server
|
Ready to Run
java -jar application.jar
No separate server installation is required.
Embedded Servers Supported by Spring Boot
1. Apache Tomcat (Default)
Tomcat is the default embedded server used by Spring Boot.
spring-boot-starter-web
When this starter is added, Tomcat is automatically included.
2. Jetty
Jetty is an alternative embedded web server.
3. Undertow
Undertow is a high-performance web server developed by Red Hat.
How to Change the Default Server?
spring-boot-starter-web
includes Tomcat.
spring-boot-starter-jetty
<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-jetty
</artifactId>
</dependency>spring-boot-starter-undertow
spring-boot-starter-web
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(
Application.class,
args);
}
}No external deployment is required.
Comparison of Embedded Servers
Tomcat
Jetty
Undertow
Benefits of Embedded Servers
Real-World Example
application.jar
This is one of the major reasons Spring Boot became popular for cloud-native and microservice-based architectures.
A concise interview answer is
Spring Boot supports embedded servers such as Apache Tomcat, Jetty, and Undertow. By default, Spring Boot uses Apache Tomcat when the spring-boot-starter-web dependency is included. These embedded servers allow applications to run as standalone JAR files without requiring deployment to an external application server.
Last updated: 11 November 2026
Previous question: How does Swagger help in documenting APIs?
Next question: How does Spring Boot decide which embedded server to use if multiple options are available in the classpath?