Getting started with Spring Boot 3 is mostly the familiar Spring experience with a few hard requirements you can’t skip. The big two: Java 17 is the new minimum, and the whole framework moved from the javax.* namespace to jakarta.*. If you’re starting fresh, you barely notice. If you’re upgrading from Boot 2, those two facts explain 90% of the migration pain. Let’s get you running, then cover what changed.
What’s actually new in Spring Boot 3
- Java 17 baseline. Boot 3 won’t run on Java 8 or 11. You also get to use records, sealed classes, pattern matching, and text blocks without apology.
- Jakarta EE 9+ namespace. Every
javax.persistence,javax.servlet,javax.validationimport becomesjakarta.*. This is the single most common upgrade gotcha. - Spring Framework 6 under the hood, with first-class observability (Micrometer tracing) and support for GraalVM native images for fast-starting, low-memory binaries.
If you’re new to Spring, don’t memorize this — just know your imports say jakarta, not javax.
Generate a project with Spring Initializr
The easiest way to start is start.spring.io. Choose Maven or Gradle, Java 17+, and add dependencies up front:
- Spring Web — REST APIs (see your first REST controller).
- Spring Data JPA — database persistence.
- Spring Boot DevTools — auto-restart on code changes during development.
Generate, unzip, and open it in your IDE. You get a standard project with a single @SpringBootApplication main class — run that and you have a live app.
Run it
Start the app (./mvnw spring-boot:run, or run the main class) and you’ll see the embedded Tomcat server come up on port 8080. This is Spring Boot’s whole philosophy in action: convention over configuration. Auto-configuration inspects your classpath — saw spring-boot-starter-web? It configures Tomcat, Jackson, and MVC. Saw a JDBC driver and spring-boot-starter-data-jpa? It wires a DataSource and JPA. You write business logic; Boot wires the plumbing.
A few first-day conventions worth knowing:
- Configuration lives in
src/main/resources/application.properties(orapplication.yml). - Spring scans for components in the package of your main class and below — keep your code under that package or things won’t be found.
spring-boot-starter-testis included by default, with JUnit 5 and an in-memory test slice setup ready to go.
Where to go next
Once the app runs, the natural progression is: add a controller, a service, and a repository following standard Spring layering. From there, the features that make Boot production-ready:
- Profiles (
application-dev.yml,application-prod.yml) for environment-specific config. - Externalized configuration so secrets and URLs come from env vars, not source.
- Spring Boot Actuator for health checks, metrics, and readiness/liveness probes — essential before you put anything on Kubernetes.
When you’re ready to ship it, containerize it — see Dockerizing Spring Boot.
Common gotchas
javaximports won’t resolve. You’re on Boot 3 — change them tojakarta. Most IDEs can do this with a global find-replace on imports.- “Unsupported class file version.” You’re building with an older JDK. Boot 3 needs JDK 17+.
- App starts then exits immediately. Usually means no web starter on the classpath — add
spring-boot-starter-webif you expect a running server. - Beans not found. Component scanning only covers the main class’s package downward; misplaced packages are the usual culprit.
FAQ
What Java version does Spring Boot 3 require?
What's the biggest change from Spring Boot 2?
javax.* → jakarta.* namespace migration. Combined with the Java 17 baseline, that’s what most Boot 2 → 3 upgrade effort goes into.
Maven or Gradle?
Do I need to deploy to a separate server?
java -jar executable. That’s also what makes them easy to containerize.
Key takeaway: Getting started with Spring Boot 3 = Java 17+, jakarta.* imports, and a project from start.spring.io. Auto-configuration handles the plumbing; you add controllers/services/repositories and lean on profiles, externalized config, and Actuator when it’s time for production.