Embedded server deployment bundles a servlet container (Tomcat, Jetty, or Undertow) directly inside the application's JAR, while external server deployment packages the app as a WAR that gets installed onto a separately managed server.
A microservices team running each service in its own Docker container almost always prefers the embedded model, while a legacy enterprise team consolidating a dozen apps onto one managed Tomcat cluster would choose external WAR deployment.
// Embedded (default): the JAR contains Tomcat and starts it from main()
@SpringBootApplication
public class ShopApplication {
public static void main(String[] args) {
SpringApplication.run(ShopApplication.class, args);
}
}
// External server: build a WAR and let Tomcat start the application
@SpringBootApplication
public class ShopApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(ShopApplication.class);
}
}
<!-- pom.xml for the WAR version -->
<packaging>war</packaging>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope> <!-- the external server already has Tomcat -->
</dependency>A concise interview answer is
With embedded deployment, Spring Boot packages Tomcat or Jetty right into the JAR so you run it standalone with java -jar. With external deployment, you build a WAR and deploy it onto a server that's managed separately and may host multiple applications. Embedded is simpler and more portable; external fits shared-server enterprise setups.
Last updated: 1 November 2026
Previous question: How does Spring Boot handle back pressure in reactive streams?
Next question: What are the pros and cons of using an embedded server in Spring Boot?