Spring Boot's embedded servlet container feature allows a web application to run with an internal web server packaged directly inside the application. This eliminates the need to install, configure, and manage an external application server separately, making deployment and development significantly easier.
Application Code
↓
WAR File
↓
External Tomcat Server
↓
Deploy and Configure
Application Code
↓
Embedded Tomcat
↓
Executable JAR
↓
java -jar app.jar
The application starts immediately with its own web server.
These can replace Tomcat by changing project dependencies.
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(
Application.class, args);
}
}Application Start
↓
Create Spring Context
↓
Initialize Embedded Server
↓
Register Servlets and Filters
↓
Application Ready
server.port=9090
8080 → 9090
server.servlet.context-path=/api
server.tomcat.max-threads=200spring-boot-starter-tomcat
spring-boot-starter-jetty
Spring Boot automatically configures Jetty as the embedded server.
This allows every service to be deployed independently as a standalone executable JAR or Docker container.
A concise interview answer is: Spring Boot uses embedded servlet containers such as Tomcat, Jetty, or Undertow to package the web server directly inside the application. This allows applications to run as standalone executable JAR files without requiring an external application server, simplifying development, deployment, and scaling.
Last updated: 16 July 2026
Previous question: Describe a Spring Boot project where you significantly improved performance. What techniques did you use?
Next question: How does Spring Boot make DI easier compared to traditional Spring?