Repaso
EspaƱol

What does Spring Boot add on top of Spring?

Options

  1. It replaces Java with a simpler language
  2. It adds auto-configuration, starters and an embedded server (Correct option)
  3. It adds a graphical interface for designing Spring apps
  4. It introduces a new programming language for Spring

Answer

Auto-configuration, starter dependencies and an embedded server, so you can run a production-ready app with minimal setup

Why

Plain Spring needs a lot of manual configuration (XML or Java config, choosing library versions, deploying a WAR to a separate server).

Spring Boot makes sensible default choices:

  • Starters: one dependency (spring-boot-starter-web) brings a compatible set of libraries.
  • Auto-configuration: if it sees a library on the classpath, it configures it for you.
  • Embedded server (Tomcat by default): the app is a normal JAR you start with java -jar.
  • Actuator: health and metrics endpoints.

Remember

Spring Boot = Spring with defaults, starters and an embedded server.

Key terms

Practice this question in Repaso