Spring Boot, a popular Java-based framework, simplifies configuring and running Java applications. If you're new to Spring Boot and eager to dive in, this beginner's guide will walk you through creating your first Spring Boot application step by step, culminating in a downloadable PDF for your convenience. Let's embark on this exciting journey!

Before we proceed, make sure you have Java Development Kit (JDK) version 11.0 or later installed on your computer. Also, you'll need to set up the Spring Initializr tool, a convenient way to bootstrap your Spring Boot applications.

Creating Your First Spring Boot Project
We'll begin by launching Spring Initializr at

Select 'Maven Project' or 'Gradle Project' depending on your preference. For this guide, we'll use Maven. Choose Java, then specify the Spring Boot version (e.g., 2.5.2). Click on 'Dependencies', add 'Web', then click 'GENERATE'. Download the generated zip file.
Setting Up Your IDE

Unzip the downloaded file. Open your preferred IDE (like IntelliJ IDEA or Eclipse) and import the project using the 'Existing Maven Projects' option.
IntelliJ IDEA users, ensure the project is configured correctly by checking if the Maven projects are imported successfully. You'll see the 'spring-boot-project' module in your IDE's Project Explorer.
Running Your Application

To run your application, right-click on the project, select 'Run', then 'Spring Boot App'. Alternatively, use the IDE's run/debug configurations and choose the 'Application' main class.
After running, you should see the following message on the console: `Tomcat started on port(s): 8080 (http) with context path '/'.` Your application is now live and accessible via
Exploring Project Structure

Let's explore the generated project structure to understand what's been created for you.
The project boasts an 'src' folder containing the 'main' and 'test' directories. 'main' holds your application's primary source code, while 'test' houses your test cases. Inside 'main', 'java' contains your application's core logic, and 'resources' stores your configuration files and static assets.









Creating a Simple Controller
Let's create a simple controller under the 'com.example.demo' package. Name it 'HelloController.java'. This controller will greet users with a friendly message.
Here's how to create it:
- Right-click on 'com.example.demo', select 'New' > 'Class', name it 'HelloController'.
- Make it implement 'Controller' and 'ResponseBody' annotations.
- Add a method annotated with '@GetMapping("/hello")'. Inside this method, return the string "Hello, World!".
Accessing the Controller URL
To access the new controller, update your application's server configuration by modifying 'src/main/resources/application.properties'. Add the following line: server.port=9090
Now, navigate to
That's it! You've just created and run aकरणontaumatolowercase met a Spring Boot project, and you've explored the basics of Spring Boot application creation. To dive deeper into Spring Boot's capabilities, you can consult the official Spring Boot documentation and explore additional tutorials and resources. Happy coding!