Spring Boot Project in 5 min

This blog will help you to create a basic Spring project within 5 min and print the custom output on screen.

Install Java

First step required is to check either Java is installed in local or not. Please ignore below step if Java is installed.

If Java not installed please follow below link Install Java

Now, we are ready to create Spring project. We will be following two different ways to create Spring project.

  1. Using Spring tool suit -> This one is my favorite as it is more flexible and scalable. We can add module after project creation also.
  2. Using only start.spring.io

Install Spring tool Suit

Yes, as name suggest we are going to use Spring Tool Suit to create spring application.

  1. Please go to link and navigate to Spring Tools 4 for Eclipse section and download the executable jar.

2. Go to download folder and double click on the downloaded jar. It process the Jar and create below sts-4.16.0.RELEASE folder depending on the downloaded version.

3. Go inside that folder as double click on the below highlighted SpringToolSuite4.exe file will open an application similar to Eclipse editor.

4. Click on File in top navigation menu and than click on new. There will be an option Spring Starter Project start appearing once we click on create new option.

Below window will start appearing.

Provide below highlighted value for Group and Artifact for the project and click on Next.

5. In the below screen select open Web option and select Spring Web. Click on Finish will create Spring project.

6. Create Person.java class as mentioned in below screenshot

OUTPUT:

Online Spring Project Creation

We can create Spring project online

  1. Click on link
  2. Select language, provide Artifact and Name of your Spring project. Select packaging and Java version. Click on GENERATE to create Spring project.

3. It will download demo.zip in download folder. unzip the file and import the same in Eclipse.

4. This will be also be having the same hierarchy we had of Spring tool suit.

5. Create Person.java class as mentioned in below screenshot

OR

OUTPUT:

Imran Khan, Adobe Community Advisor, AEM certified developer and Java Geek, is an experienced AEM developer with over 11 years of expertise in designing and implementing robust web applications. He leverages Adobe Experience Manager, Analytics, and Target to create dynamic digital experiences. Imran possesses extensive expertise in J2EE, Sightly, Struts 2.0, Spring, Hibernate, JPA, React, HTML, jQuery, and JavaScript.

0