Backend

Spring Boot

An opinionated layer over Spring for Java and Kotlin with auto-configuration and one-command startup.

What it is

Spring Boot removed the tedious XML setup of classic Spring. Auto-configuration picks beans from classpath dependencies, and starters pull in consistent library sets.

An app is packaged as one executable JAR with an embedded Tomcat. Actuator gives metrics and health checks, Spring Data covers databases, Spring Security covers auth.

It is the de facto standard for enterprise Java backends. It supports Kotlin, Java 21 virtual threads and GraalVM native images.

Use it when

  • Enterprise backends, banking and complex domain systems.
  • Microservices on the JVM with a ready ecosystem.
  • The team knows Java or Kotlin.

Avoid it when

  • Small scripts and prototypes: the startup is too heavy.
  • Tight memory and cold-start limits without native images.

Key concepts

Auto-configuration
Automatic bean creation based on the classpath and properties.
Starter
A dependency that pulls in a ready set of libraries.
IoC / DI
The container creates beans and injects them into other beans.
Actuator
Monitoring endpoints: health, metrics, info.

Example

A REST controller with constructor injection.

Interview questions

  1. 1. What is auto-configuration?

    Spring Boot inspects the classpath and properties and creates needed beans automatically. For example, on seeing a DB driver it configures a DataSource.

  2. 2. What are a bean and IoC?

    A bean is an object managed by the Spring container. IoC means the container creates dependencies and passes them in, instead of the class calling new.

  3. 3. What is Actuator for?

    Production monitoring: health endpoints, metrics, build info. It integrates with Prometheus and Kubernetes probes.

Logos belong to their owners and are used for identification only. Icons: Simple Icons (CC0), Devicon (MIT).