Spring BootSpring Corebeginner
Updated:

Spring vs Spring Boot: What's the Difference

5 min read

Spring is the framework; Spring Boot is the opinionated layer that removes its configuration burden. Here is exactly where one ends and the other begins.

TL;DR – Quick Answer

Spring is the core framework that provides dependency injection, MVC and data access, but it leaves configuration up to you. Spring Boot is a layer built on top of Spring that adds auto-configuration, starter dependencies and an embedded server so you can run an application with almost no setup. You are always using Spring underneath Spring Boot; Boot just removes the boilerplate.

On This Page

The two names get used interchangeably in job posts and tutorials, which confuses beginners into thinking they are competing products. They are not. Spring is the framework; Spring Boot is a convenience layer wrapped around it. Once you see what each part actually contributes, the distinction becomes obvious — and it is a question you will be asked in almost every fresher interview.

The relationship in one sentence

Spring Boot does not replace Spring; it packages Spring so you do not have to assemble it by hand. Everything Spring Boot runs — the dependency injection, the MVC layer, the data access — is core Spring Framework underneath. Boot's job is to choose sensible defaults and wire them for you, so that the framework you were always going to use starts working in minutes instead of hours.

Think of Spring as a warehouse of parts and Spring Boot as a pre-built kit that reaches into that warehouse, picks the parts a typical web application needs, and bolts them together. You can still open the kit and swap parts, but you rarely need to.

What core Spring gives you

The Spring Framework's foundation is the container and its programming model:

  • Inversion of control and dependency injection — objects declare what they need and Spring supplies it, instead of each class constructing its own collaborators.
  • The application context — a registry of managed beans with a full lifecycle.
  • Spring MVC — the request-handling model behind @Controller and @RestController.
  • Data access — templates and abstractions over JDBC, JPA and transactions.
  • AOP — cross-cutting concerns like logging and security applied without touching business code.

Every one of these is available with plain Spring. The catch is that plain Spring expects you to configure them. You declare beans, register the dispatcher servlet, set up a view resolver, and package a WAR for an external server. It works, but the setup is substantial.

What Spring Boot adds on top

Spring Boot keeps all of that and removes the setup with three headline features:

  1. Auto-configuration — Boot inspects your classpath and configures beans automatically. See a JPA driver? It configures a data source. See Spring MVC? It configures the dispatcher servlet. The mechanics are covered in Spring Boot auto-configuration.
  2. Starters — curated dependency bundles like spring-boot-starter-web that pull in a compatible set of libraries with one line, explained in Spring Boot starters.
  3. Embedded server — Tomcat ships inside your JAR, so java -jar app.jar runs a full web server with no external install.

Pro tip: When an interviewer asks "what does Spring Boot add", do not just say "it makes things easier". Name the three pillars — auto-configuration, starters, embedded server — and you immediately sound like someone who has read past the marketing.

A side-by-side comparison

Dimension Spring Framework Spring Boot
Configuration Manual (Java or XML) Auto-configured from classpath
Dependencies Pick and version each library Starters bundle compatible sets
Server External Tomcat, deploy a WAR Embedded Tomcat, run a JAR
Boilerplate High Minimal
Entry point Configure dispatcher servlet One @SpringBootApplication class
Underlying model The framework itself The same framework, pre-wired

The row that matters most is the last one: the underlying model is identical. That is why you must still learn core Spring even if you only ever write Boot code.

The same app, both ways

A minimal Spring Boot web application is essentially one class:

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@RestController
public class HelloApp {

    @GetMapping("/hello")
    public String hello() {
        return "Hello from Spring Boot";
    }

    public static void main(String[] args) {
        SpringApplication.run(HelloApp.class, args);
    }
}

Run it and you have a working HTTP server on port 8080. There is no web.xml, no dispatcher servlet declaration, no server to install. In plain Spring the same result requires a configuration class registering the dispatcher servlet, a view or message converter setup, and a build that produces a WAR:

@Configuration
@EnableWebMvc
@ComponentScan("com.example")
public class WebConfig implements WebMvcConfigurer {
    // plus a servlet initializer class, plus WAR packaging,
    // plus an installed Tomcat to deploy into
}

The Boot version is not doing less — it is doing the same work with the configuration hidden. The @SpringBootApplication annotation is a shortcut that turns on component scanning, auto-configuration and configuration support in one line.

Common mistake: Some learners conclude that because Boot hides configuration, the fundamentals no longer matter. The opposite is true. When auto-configuration does something you did not expect, only knowledge of the underlying Spring beans and context lets you debug it.

The production features you only get with Boot

The difference is not only about startup convenience — Spring Boot adds an operations layer that plain Spring leaves to you. The headline example is Actuator. Add one starter and your application exposes health checks, metrics, and environment information over HTTP:

## with spring-boot-starter-actuator on the classpath
management.endpoints.web.exposure.include=health,info,metrics

Now /actuator/health reports whether the app and its database are up, which is exactly what a load balancer or Kubernetes probe needs. Building the equivalent on plain Spring means wiring those endpoints and metrics yourself. Boot also gives you sensible logging defaults, externalised configuration through application.properties, and a consistent build via the Boot Maven or Gradle plugin that produces the runnable JAR. These are the unglamorous features that make an app deployable, and they are the reason teams reach for Boot even for services that could technically run on plain Spring.

A sensible learning order

Because the two are layered, learners sometimes ask which to study first. Start with Spring Boot — it lets you build something that runs on day one, which keeps motivation high. But do not stop at the surface. As you go, learn the core concepts Boot is hiding: beans, the application context, dependency injection, and bean scopes.

A workable path is: build a running app with Spring Boot starters, then understand what Spring Boot is and how auto-configuration decides what to wire, and finally go down into the core container. That order means you are always able to build, while steadily filling in the foundation. Skipping the foundation is the mistake that leaves developers unable to debug when auto-configuration does something unexpected.

When plain Spring still appears

For new projects, Spring Boot is the default and there is little reason to start with plain Spring. You will still meet raw Spring in two situations: legacy applications built before Boot existed, and rare deployments where the embedded-server model does not fit. Knowing the difference means you can move between both without confusion — and it means you understand what Spring Boot is actually doing for you rather than treating it as a black box.

Interview relevance

"What is the difference between Spring and Spring Boot" is one of the most predictable questions in any Spring interview, and a weak, hand-wavy answer stands out badly. Structure your response: state that Boot is built on Spring, name the three things it adds, and give the concrete example of the embedded server replacing an external WAR deployment. Then be ready for the follow-up — why you still need core Spring knowledge. Rehearse this with the dedicated Spring vs Spring Boot interview breakdown so the answer comes out crisp under pressure.

Frequently Asked Questions

Is Spring Boot a replacement for the Spring Framework?
No. Spring Boot is built on top of the Spring Framework and depends on it entirely. Every Spring Boot application uses the same core Spring beans, dependency injection and MVC underneath. Boot only adds convenience layers like auto-configuration and starters on top of that foundation.
What is the single biggest difference between Spring and Spring Boot?
Configuration effort. Plain Spring expects you to declare beans, configure the dispatcher servlet, and set up a server yourself. Spring Boot auto-configures sensible defaults from the dependencies on your classpath, so a working web application needs almost no manual configuration.
Do I still need to learn core Spring if I use Spring Boot?
Yes. Concepts like beans, dependency injection, and the application context come from core Spring and appear constantly in Boot code and interviews. Spring Boot hides configuration, not the fundamentals, so understanding the framework underneath makes you far more effective at debugging.
Does Spring Boot include an embedded server?
Yes. The spring-boot-starter-web dependency bundles an embedded Tomcat by default, so your application ships as a runnable JAR with the server inside it. Plain Spring produces a WAR that you deploy into an external server you install and configure yourself.
When would you choose plain Spring over Spring Boot?
Almost never for new projects. You might work with plain Spring when maintaining a legacy application predating Boot, or when a very unusual deployment forbids the embedded server model. For essentially all new development, Spring Boot is the default choice.

Want to Build Your Career in Java Full Stack with AI?

Join CodeBegun and train with working industry engineers — Explore the Program

Apply for Demo Class →
Siva Prasad Galaba
Founder, CodeBegun · Staff Engineer

Founder of CodeBegun. 15+ years building Java systems at companies like Crunchyroll. Teaches Java, Spring Boot and system design the way the industry actually works, and mentors students through projects, mock interviews and placement preparation.

Technically reviewed by CodeBegun Technical TeamLast reviewed 15 July 2026 LinkedIn
Chat with us