Home / Spring Boot / Getting Started / What is Spring Boot?

What is Spring Boot?

Spring Boot is a framework built on top of the Spring Framework. It lets you create stand-alone, production-ready applications with very little configuration. You write your business code, and Spring Boot sets up the server, the database connection, JSON conversion, logging and much more for you. The latest stable line is Spring Boot 4.1 (June 2026), and it needs Java 17 or higher (Java 21 or higher is recommended).

Spring Framework vs Spring Boot

PointSpring FrameworkSpring Boot
ConfigurationYou write XML or Java configuration for everythingAuto-configuration sets sensible defaults
ServerBuild a WAR and deploy to an external TomcatEmbedded Tomcat inside the jar. Run with java -jar
DependenciesYou choose every library and its versionStarters and a tested version list (BOM)
Setup timeHours or daysMinutes (start.spring.io)
Production toolsYou build themActuator: health, metrics, info out of the box
StyleFlexible, but you configure a lotOpinionated: defaults first, override when needed

Main features

Version map

Spring BootSpring FrameworkJakarta EEMinimum JavaNotes
3.x6.x1017Moved from javax.* to jakarta.* packages
4.x7.x1117 (21+ recommended)Modular code base, Jackson 3 by default, API versioning, JSpecify null-safety

There is no LTS version in Spring Boot. A new minor version comes about every six months, and each minor version gets open source support for about 12 months. Always check the Spring Boot support page before choosing a version for a new project.

The smallest Spring Boot application

package com.example.demo;

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 DemoApplication {

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

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

What happens when you run it

main()  ──►  SpringApplication.run()
                 │
                 ├─ 1. create the ApplicationContext (the bean container)
                 ├─ 2. scan your packages for @Component, @Service, @RestController ...
                 ├─ 3. run auto-configuration (DispatcherServlet, Jackson, DataSource ...)
                 ├─ 4. start the embedded Tomcat on port 8080
                 └─ 5. publish ApplicationReadyEvent  ──►  app is ready

The Spring ecosystem map

ProjectPurposeYou use it for
Spring FrameworkCore: IoC container, AOP, transactions, MVC, WebFlux, testingEverything. Boot is built on it
Spring BootAuto-configuration, starters, embedded server, Actuator, packagingApplication setup and running
Spring DataRepository abstraction for JPA, JDBC, MongoDB, Redis, ElasticsearchDatabases
Spring SecurityAuthentication, authorization, protection against attacksLogin, JWT, OAuth2, roles
Spring CloudConfig server, gateway, discovery, circuit breakers, tracingMicroservices
Spring BatchChunk based batch jobs with restartImports, reports, migrations
Spring Integration / Kafka / AMQPMessaging and enterprise integration patternsEvents and queues
Spring AI / GraphQL / ModulithAI models, GraphQL APIs, modular monolith structureNewer needs

What Boot decides for you (opinionated defaults)

ConcernDefault choiceHow to change
Web serverTomcat on port 8080Exclude starter-tomcat, add Jetty or Undertow. server.port
JSONJackson (auto-registered modules for java.time, Optional, records)spring.jackson.* or a JacksonBuilderCustomizer
LoggingLogback through SLF4J, console output, INFO levellogging.* properties or logback-spring.xml, or switch to Log4j2
Connection poolHikariCPspring.datasource.hikari.*
ORMHibernate with Spring Data JPAspring.jpa.*
ValidationHibernate Validator (Bean Validation)Own Validator bean
TestingJUnit 5, Mockito, AssertJ, MockMvc, JsonPathExclude and add your own
HTTP clientRestClient / WebClient builders with JacksonCustomizers, spring.http.client.*

The rule is: convention first, configuration only when you differ. Every default backs off when you define your own bean (see the auto-configuration page), so you can replace exactly one piece and keep the rest.

Layers of a typical Spring Boot application

Client (browser, mobile, other service)
   │ HTTP / JSON
   ▼
┌────────────────────────── Spring Boot application (one JVM process, one jar) ──────────────────────────┐
│  Web layer        @RestController   URLs, status codes, DTO in/out, validation (@Valid)                 │
│       │  security filters (Spring Security) and cross-cutting filters run before this layer            │
│       ▼                                                                                                 │
│  Service layer    @Service          business rules, transactions (@Transactional), events, caching      │
│       ▼                                                                                                 │
│  Data layer       @Repository       Spring Data JPA / JDBC / Mongo, entities                            │
│       ▼                                                                                                 │
│  Infrastructure   DataSource pool, Kafka/RabbitMQ clients, RestClient, cache, scheduler                 │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────┘
   ▼                    ▼                       ▼
Database            Message broker         Other services

Spring Boot compared with alternatives

FrameworkStrengthConsider when
Spring BootLargest ecosystem, hiring pool, mature libraries, runs everywhereDefault choice for enterprise Java
QuarkusVery fast startup and low memory (native image first), live codingServerless and tiny containers
MicronautCompile time dependency injection, fast startupLow footprint microservices
Jakarta EE (WildFly, Payara)Standards based, application server modelExisting EE estates
Helidon, Javalin, Vert.xLightweight or reactiveSpecial needs

Spring Boot with virtual threads (Java 21+), CDS/AOT cache and optional GraalVM native image has closed much of the startup and memory gap. Choose by team skills and ecosystem first.

Suggested learning path

Common mistake: Thinking Spring Boot replaces Spring. It does not. Spring Boot is Spring with automatic setup. All Spring concepts (beans, DI, AOP, transactions) still apply.

Interview questions

Do I need XML configuration in Spring Boot?

No. Spring Boot uses Java annotations and properties or YAML files. XML is still possible but almost never needed.

Which server does Spring Boot use by default?

Embedded Apache Tomcat on port 8080. You can switch to Jetty or Undertow by changing the dependencies.

Is Spring Boot only for microservices?

No. It works for monoliths, REST APIs, web apps, batch jobs and microservices.

What is the difference between Spring Boot and Spring MVC?

Spring MVC is the web framework part of Spring Framework (controllers, DispatcherServlet). Spring Boot is the setup layer that configures MVC, Tomcat, Jackson and everything else automatically.

Can I use Spring Boot without Maven or Gradle?

Technically yes with the CLI or manual jars, but Maven or Gradle give you dependency management and the repackaging plugin. In practice always use one of them.