What Is Spring Boot

Introduction

Spring Boot is an opinionated layer on top of the Spring Framework that helps you create stand-alone, production-grade Java applications with very little setup. Instead of wiring dozens of XML files and hunting down compatible library versions, you add a starter dependency, write a few lines of configuration, and focus on business code. Spring Boot 3 targets Java 17+ and the Jakarta EE namespace (jakarta.* instead of javax.*)—this track walks you from that first question (“what is it?”) through real APIs, data access, and deployment.

Prerequisites

  • Basic Java syntax (classes, packages, main)
  • Helpful but not required: awareness of Maven or Gradle for dependency management
  • No Spring Boot installation needed yet—this chapter is conceptual

Spring Framework vs Spring Boot

LayerRole
Spring FrameworkCore IoC container, dependency injection, AOP, transaction abstraction, integration with JDBC, web, messaging, and more
Spring BootAuto-configuration, starters, embedded servers, sensible defaults, and production features (health checks, metrics, externalized config)

Spring Boot does not replace Spring. It uses Spring and adds conventions so common stacks (web + JSON + database) work quickly.

Think of it this way:

text
Your code  →  Spring Boot (starters + auto-config)  →  Spring Framework  →  Libraries (Tomcat, Jackson, HikariCP, …)

What Problem Spring Boot Solves

Before Spring Boot, a typical Spring web app required:

  • Manual dependency versions across many JARs
  • web.xml or lengthy Java configuration for servlets and MVC
  • Deploying a WAR to an external Tomcat server
  • Copying boilerplate for logging, connection pools, and JSON mapping

Spring Boot addresses that with:

Convention over configuration — standard folder layout (src/main/java, src/main/resources) and defaults that work for most projects.

Starters — curated dependency bundles (spring-boot-starter-web, spring-boot-starter-data-jpa, and so on) so you declare what you need, not every transitive JAR.

Auto-configuration — Spring Boot inspects the classpath and configures beans only when relevant (for example, a DataSource when JDBC is on the classpath and properties are set).

Embedded servers — run Tomcat (or Jetty / Undertow) inside your app; ship one executable JAR and run java -jar app.jar.

Production-ready features — health endpoints, metrics, and externalized configuration without bolting on a separate stack.

A Minimal Mental Model

A Spring Boot application usually has:

  1. A main class annotated with @SpringBootApplication
  2. Configuration in application.yml or application.properties
  3. Components (controllers, services, repositories) discovered by component scanning
java
@SpringBootApplication
public class DemoApplication {
 
    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }
}

Code explanation:

  • @SpringBootApplication combines configuration, component scan, and auto-configuration enablement
  • SpringApplication.run starts the embedded server and refreshes the Spring context
  • You will build on this pattern in the environment and quick-start chapters

Key Features at a Glance

FeatureWhat it gives you
StartersOne dependency pulls in a whole “scene” (web, security, data JPA) with tested versions
Auto-configurationBeans appear when conditions match (classpath + properties)
Externalized configChange port, datasource URL, or feature flags without recompiling
ActuatorHealth, metrics, and operational endpoints for production
Executable JARSingle artifact to run or containerize

Tip

Starters Are Menus, Not Magic

A starter is a dependency aggregate. Import spring-boot-starter-web and you get Spring MVC, Jackson, Tomcat, and related libraries with versions aligned by Spring Boot’s dependency BOM—not a separate framework.

Spring Boot 3 vs Earlier Versions

Spring Boot 3 is a major line. Highlights that matter on day one:

TopicSpring Boot 3
JavaBaseline Java 17 (Java 21 is common in new projects)
Jakarta EEjakarta.servlet, jakarta.persistence, etc. (not javax.*)
Spring FrameworkBuilt on Spring Framework 6
Native imagesImproved GraalVM native and AOT support (covered later in this track)
ObservabilityMicrometer-based metrics and tracing integrations

If you maintain older tutorials or libraries still on javax.*, plan a migration before adopting Boot 3. Greenfield learning should start on Boot 3 and Java 17+.

Typical Use Cases

Spring Boot fits many backend scenarios:

  • REST APIs for web and mobile clients
  • Microservices (often with Spring Cloud in larger systems)
  • Internal tools and admin backends
  • Batch and scheduled jobs with Spring’s scheduling support
  • Integration apps (message queues, third-party APIs, ETL-style flows)

It is less ideal when you need a non-JVM runtime only, or an ultra-minimal process with zero framework—then plain Java or another stack may be simpler.

Spring Boot vs “Plain Spring” vs Legacy Java EE

ApproachDeploymentConfigurationBest when
Plain SpringOften WAR on external serverMore manual Java/XML configYou need maximum control over every bean
Spring BootExecutable JAR (or WAR still supported)Defaults + properties + selective Java configMost new Java backends and APIs
Legacy Java EE (full server)Heavy app serverContainer-specific descriptorsMaintaining old enterprise apps

Warning

Boot 3 Requires Jakarta-Compatible Libraries

Third-party libraries compiled only for javax.* may not work until you upgrade to a Jakarta-compatible release. Check release notes before upgrading production apps.

How This Track Is Organized

This Spring Boot 3 series follows gen_article_plan/springboot3.md:

SectionTopics
Environment & first projectJDK, Maven, IDEA, Hello World API
Quick start & configurationStarters, structure, application.yml, profiles
Web & dataMVC, validation, JDBC, MyBatis, transactions
InternalsAuto-configuration, startup flow, custom starters
IntegrationsRedis, OpenAPI, Feign, messaging, security, observability, AOT
Reactive & opsWebFlux, R2DBC, packaging, troubleshooting

Related Hello Code paths:

  • Maven — dependency and build basics
  • JDBC — database access under the hood
  • Java — language fundamentals
  • Tomcat — standalone Servlet container, WAR deploy, and Nginx in front (complements embedded Tomcat in Boot)

FAQ

Is Spring Boot a separate language?

No. You write Java (or Kotlin). Spring Boot is libraries and conventions on the JVM.

Do I need to learn the entire Spring Framework first?

You should understand dependency injection and basic Spring concepts (beans, components, @Autowired). You can learn many details while using Boot—this track introduces them in context.

Can I use Spring Boot without Maven?

Yes. Gradle is fully supported (spring-boot-gradle-plugin). This site’s examples often use Maven for consistency with the Maven track.

Does Spring Boot only build web applications?

No. Starters exist for batch jobs, messaging, data access without a web tier, and more. The web starter is simply the most common entry point.

What is the difference between Spring Boot and Spring Cloud?

Spring Boot helps you build and run one application well. Spring Cloud adds patterns for distributed systems (service discovery, configuration servers, gateways). Learn Boot first.

Why Java 17 for Spring Boot 3?

Spring Boot 3 aligns with modern LTS Java and Jakarta EE 9+. Older Java versions are not supported on the Boot 3 line.

Is Spring Boot good for beginners?

If you already know Java basics, Boot is one of the fastest ways to get a working HTTP API. If Java itself is new, spend time on core language and OOP first, then return here.