In this blog, we are going to learn, how to create a spring boot project. This is our first creation of a spring boot project. Typically two way we can create java spring boot project.
- Using Spring Initializr
- Direct in IDE
Spring Initializr is an online UI that provides to initialize a project for Java, Kotlin, and Groovy. This UI is very clear to create a Java Spring Boot project. As beginners first, we will create a spring boot project using Spring Initializr. Then in the next blog, we will create the project in IDE.
Below are the all steps to initialize a Java Spring Boot project and import in Intellij idea.
Step 1: Initialize a spring boot project.
Explain the all option here -
- Project : Dependency Type (Maven)
- Language: Programming Language (Java)
- Spring Boot Version: 3.3.1
- Packaging: Jar file typically used for standalone applications (Like API, Microservices). War file used for web application. (Like Java EE Application)
- Java: Version of JDK(17)
- Add Dependency: We can add Maven dependency(MySql, Lombok) during initializing a project.
- Finally click on GENERATE then it will automatically start downloading the project as a zip file.
Step 2: Open spring boot project in IntelliJ idea. Just follow the bellow screenshot to open simply your spring boot project.
![]() |
If you already have SDK in your machine but still facing this issue then just follow the below two screenshot. Otherwise skip below two screenshot. |
![]() |
Click on Setup SDK |
![]() |
My JDK version is 19. Therefore it shows JDK 19. Just select your JDK from here. |
![]() |
Finally solved the JDK issue. Remember you must install JDK before creating a project. |
![]() |
Finally, run the main class. |
See, our project run successfully in embedded Tomcat server 8080 port. 👍
In the next blog, we will create two simple APIs with the GET method. We will call those APIs from the browser to get data from the server in JSON format.
0 Comments