Creating a Spring Boot Project
Following are the steps to create a simple Spring Boot Project.
Step 1: Open the Spring initializr https://start.spring.io.
Step 2: Provide the Group and Artifact name. We have provided Group name com.javatpoint and Artifact spring-boot-example.
Step 3: Now click on the Generate button.
When we click on the Generate button, it starts packing the project in a .rar file and downloads the project.
Step 4: Extract the RAR file.
Step 5: Import the folder.
File -> Import -> Existing Maven Project -> Next -> Browse -> Select the project -> Finish
It takes some time to import the project. When the project imports successfully, we can see the project directory in the Package Explorer. The following image shows the project directory:
Step 6: Run the SpringBootExampleApplication.java file.
Right-click on the file -> Run As -> Java Applications
The following image shows the application runs successfully.