Skip to content
Spring Boot introduction 3 min read

What is Spring Boot?

Spring Boot is an opinionated framework built on top of the Spring Framework that lets you create stand-alone, production-grade applications with minimal configuration. Instead of wiring beans, servlet containers, and infrastructure by hand, you declare your intent and Spring Boot assembles a sensible default for you.

The problem Spring Boot solves

The classic Spring Framework is powerful but demanding. A typical web app required hundreds of lines of XML, an external application server, and careful version alignment across dozens of libraries. Spring Boot removes that ceremony so you can focus on business logic.

Auto-configuration

Spring Boot inspects the classpath and your defined beans, then configures the application automatically. If spring-webmvc is present, it sets up a DispatcherServlet. If an H2 driver is on the classpath, it configures an in-memory DataSource. You override defaults only where your application genuinely differs.

Note: Auto-configuration is conditional. Each @Configuration is guarded by annotations like @ConditionalOnClass and @ConditionalOnMissingBean, so your explicit beans always win.

Starters

Starters are curated dependency descriptors. Adding spring-boot-starter-web pulls in Spring MVC, Jackson, validation, and an embedded Tomcat in compatible versions. You stop hand-picking individual JARs and version conflicts largely disappear.

Embedded server

Boot ships an embedded servlet container (Tomcat by default; Jetty or Undertow optionally). Your application becomes a runnable java -jar app.jar artifact, ideal for containers and cloud platforms. No external server to install or manage.

Opinionated defaults

Boot chooses well-tested defaults for logging, JSON serialization, connection pooling (HikariCP), and more. These are starting points, not handcuffs, every default is overridable through properties or beans.

Spring vs Spring Boot

ConcernSpring FrameworkSpring Boot
ConfigurationManual (XML or Java)Auto-configured
DependenciesHand-managed versionsStarters + BOM
ServerExternal (deploy a WAR)Embedded, runnable JAR
BoilerplateHighMinimal
Production toolingAdd-onBuilt-in (Actuator)
Time to first endpointHoursMinutes

Tip: Spring Boot does not replace Spring, it configures it. Everything you know about the core container, AOP, and transactions still applies.

A minimal application

A single annotated class is enough to bootstrap a fully functional service.

package com.devcraftly.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 {

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

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

The @SpringBootApplication annotation is a convenience meta-annotation combining @Configuration, @EnableAutoConfiguration, and @ComponentScan. Running main starts the embedded server on port 8080.

Output:

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 :: Spring Boot ::                (v3.3.0)

Tomcat started on port 8080 (http) with context path '/'
Started DemoApplication in 1.42 seconds (process running for 1.8)

Visit http://localhost:8080/ and you receive Hello from Spring Boot!. From here you can layer in data access, security, and configuration, each handled by another well-behaved starter.

Last updated June 1, 2026
Was this helpful?