Spring Boot for Beginners / Chapter 1 — Getting started and web basics (lessons 1–5) / Lesson 1

Setting up and creating the project

Time needed: about 5 min (estimate)

☆ Read later

You can try the opening of this lesson without an account.

What was so hard about Java on the web before?

You appreciate Spring Boot once you know what came before.

Before 2014, it meant installing Tomcat separately, working out which library versions went together, registering a DispatcherServlet in web.xml, defining beans in XML, dropping a war into Tomcat's webapps and restarting — a world where Hello World took half a day.

Spring Boot removed all six.

Creating the project

On Spring Initializr choose Maven, Java 21 and Spring Boot 4.1.1, and add Spring Web and Spring Boot DevTools as dependencies.

The same thing is one command line.

Initializr is a service that only generates a skeleton; nothing special happens inside it.

Initializr defaults to Gradle, but this course uses Maven, whose pom.xml structure is explicit and easy to read.

Create a free account to keep reading

With an account you can read the rest of this lesson, take the quiz, and read every free lesson in this course. Lessons you answer correctly are recorded as complete.

Report a problem with this lesson

Log in to send a report.

Keyboard shortcuts

Keys available in a lesson
KeyAction
[ or Alt + ←Go to the previous lesson
] or Alt + →Go to the next lesson
?Open this list
EscClose this list

The keys do not work while the cursor is in a code editor or an input field.