Setup: JDK & Project
Install the JDK
Spring Boot 4 needs Java 17 or newer and supports Java 25. Take the newest LTS:
No Maven or Gradle install needed — generated projects ship a wrapper.
Generate a project
Use start.spring.io in the browser, or the API:
What you get:
The build file
A starter is a dependency that pulls in a whole topic. The parent pins every version,
so your dependencies carry no <version> tag.
New in Spring Boot 4
The code base is fully modularized: auto-configuration now lives in many small,
focused jars instead of one big spring-boot-autoconfigure. Starters keep working
unchanged — you just ship fewer classes you never use.
Run it
Editor
- IntelliJ IDEA Community — open
pom.xml, set the project SDK to 25 - VS Code — install Extension Pack for Java and Spring Boot Extension Pack
Port already in use?
Another process holds 8080. Start with ./mvnw spring-boot:run -Dspring-boot.run.arguments=--server.port=8081.
★ Exercises
- Install a JDK and print
java --version. - Generate a project with the
webandactuatordependencies. - Start it and open
http://localhost:8080/actuator/health. - Run
./mvnw dependency:treeand find out whatspring-boot-starter-webpulled in.