Skip to content
  • Facebook
GeekCer Logo

GeekCer

The geek's Coding education and Review centre

  • Home
  • Tutorials
    • Java
    • Servlet
    • JSP
    • Python
    • C Tutorial
    • Spring
    • Spring Boot
    • MongoDB
    • Hibernate
    • Data Structure
  • General Knowledge
  • Biography
  • Grammar
  • Festival (त्योहार)
  • Interview
  • Differences
  • Important
  • Toggle search form

Home » Spring Boot » Spring Initializr for Spring Boot Project

  • International Nurses Day in Hindi | नर्स दिवस क्यों मनाते हैं?
    International Nurses Day in Hindi | नर्स दिवस क्यों मनाते हैं? General Knowledge
  • Chhath Puja Story
    Chhath Puja History : क्यों मनाते हैं छठ महापर्व Festival
  • Kishore Kumar Biography in Hindi | किशोर कुमार की जीवनी
    Kishore Kumar Biography in Hindi | किशोर कुमार की जीवनी Biography
  • Chemical Properties of Matter (Element, Compound and Mixture)
    Chemical Properties of Matter examples (Element, Compound and Mixture) Science
  • America Independence Day : 4th July USA | USA Birthday
    America Independence Day : 4th July USA | USA Birthday General Knowledge
  • Gautama Buddha life story in Hindi, Buddha's history
    Gautama Buddha life story in Hindi, Buddha’s history Biography
  • Kapil Sharma Show, Comedy Show in Hindi
    Kapil Sharma Show, Comedy Show in Hindi Biography
  • Ayodhya Kand in Hindi | अयोध्या काण्ड | राम को 14 वर्ष का वनवास
    Ayodhya Kand in Hindi | अयोध्या काण्ड | राम को 14 वर्ष का वनवास Spiritual

Spring Initializr for Spring Boot Project

Posted on October 16, 2021October 16, 2021 By GeekCer Education No Comments on Spring Initializr for Spring Boot Project
Spring Initializr for Spring Boot Project

We may create a spring boot project with the help of spring initializr. In order to do so, we should first import the project into Eclipse. It does not require any manual configuration.

Setting up a Spring Boot environment is easier than setting up any other framework.

Table of Contents

  • What are the benefits of using Spring Boot Initializr?
  • Tools required for Spring Boot
  • Steps of creating Spring Boot project
    • Step 1: Generate Spring Boot project using Spring Initializr
    • Step 2: Download and extract the zip file which is created by Spring Initializr
    • Step 3: Import extracted project to eclipse
    • Step 4: Browse maven project.
    • Step 5: Create a class which will be the REST controller
    • Step 6: Run project as Java Application
    • Step 7: Console output will look like this
    • Step 8: Hit the following url in the browser

What are the benefits of using Spring Boot Initializr?

The Spring Boot initializer is a basic tool for quickly getting Spring Boot applications up and running.

  • For developing Quick Start applications, Spring Initializr provides an extendable API.
  • With a few clicks, we can establish an application setup.
  • It cuts down on the time it takes to set up an application.
  • It boosts productivity.

Tools required for Spring Boot

The following tools are required for Spring Boot:

  • Java JDK 8
  • Eclipse or STS

Steps of creating Spring Boot project

There are a variety of ways to build a Spring Boot application, but the most simple one is to use the Spring initializr.

Step 1: Generate Spring Boot project using Spring Initializr

The Spring Initializers link is an excellent place to begin. This link can be used to help you prepare for the project by giving relevant information.

Generate Spring Boot project using Spring Initializr
Generate Spring Boot project using Spring Initializr

Step 2: Download and extract the zip file which is created by Spring Initializr

After generating the project in Step 1, you may download it to your local drive and import it into eclipse in the next step.

Step 3: Import extracted project to eclipse

After using spring initializr to create the project, you can import it into eclipse.

Spring Boot Import extracted project to eclipse
Import extracted project to eclipse

Step 4: Browse maven project.

Configuring and setting up Spring Boot dependencies and Java projects may take a bit of time.

Spring Boot Browse maven project
Browse maven project

Step 5: Create a class which will be the REST controller

Create a HelloGeek class

                  package com.geekcer.GeekApplication;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class HelloGeek {
	
  @GetMapping("/hello")
  public String welcomeGeek() {
    return "Hello, Welcome to Geek World!";
  }
}

Spring Boot Create a class which will be the REST controller
Create a class which will be the REST controller

Step 6: Run project as Java Application

Once you’ve created your first Spring Boot application, you can launch it as a Java application.

Spring Boot Run project as Java Application
Run project as Java Application

Step 7: Console output will look like this

When you run the Spring application the console output will look like this.

Console output will look like this
Console output will look like this

Step 8: Hit the following url in the browser

http://localhost:8080/api/hello
Here 8080 is default port number of Spring Boot embedded Tomcat server.
Hit the url in the browser
Hit the url in the browser

Share this:

  • Click to share on Facebook (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • More
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Pinterest (Opens in new window)

Also Read

Spring Boot

Post navigation

Previous Post: Spring Boot Tutorial
Next Post: Top Spring Boot Annotations

More Related Articles

Bean Scopes in Spring, Types of Bean Scopes, Examples Bean Scopes in Spring, Types of Bean Scopes, Examples Spring
Spring Boot Tutorial Spring Boot Tutorial Spring Boot
Mockito unit testing spring boot Mockito Framework Tutorial for Unit testing | Mockito unit testing spring boot Important
Top Spring Boot Annotations Top Spring Boot Annotations Spring Boot
HTTP status codes List | Response Status Code Glossary HTTP status codes List | Response Status Code Glossary Important

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • National Farmers Day in Hindi | राष्ट्रीय किसान दिवस पर निबंध | चौधरी चरण सिंह जयंती
  • Human rights day in Hindi: 10 दिसंबर ह्यूमन राइट्स डे
  • Unicef day is celebrated on December 11 | Speech on unicef day
  • Indian Navy Day: जल सेना दिवस कब और क्यों मनाया जाता है?
  • P V Sindhu Biography in Hindi, Badminton, State, Caste पी. वी. सिंधु जीवन परिचय, कहानी, राज्य, जाति
  • Draupadi Murmu Biography In Hindi | द्रौपदी मुर्मू की जीवनी
  • Difference between Internet and Intranet
    Difference between Internet and Intranet Differences
  • Network kya hai (नेटवर्क क्या है)
    Network kya hai (नेटवर्क क्या है) Networking
  • Difference between TCP and UDP
    Difference between TCP and UDP | TCP vs UDP examples Differences
  • OSI Model | 7 Layers of OSI Model in Computer network
    OSI Model | 7 Layers of OSI Model in Computer network, Functions Networking
  • Similarities and difference between OSI and TCP/IP model
    OSI vs TCP/IP Model, Similarities and difference between OSI and TCP/IP model Networking
  • TCP/IP Model, Full Form, Layers and their Functions
    TCP/IP Model, Full Form, Layers and their Functions Networking
  • IPv4 Vs IPv6 | Difference between IPv4 and IPv6
    IPv4 Vs IPv6 | Difference between IPv4 and IPv6 Differences
  • Java Tutorial
  • Servlet Tutorial
  • JSP Tutorial
  • Maven Tutorial
  • HTML Tutorial
  • Programs
  • Hindi/English Grammar
  • Difference Between ... and ...
  • HR Interview
  • Important Articles

Write to Us:
geekcer.code@gmail.com

  • About Us
  • Privacy and Policy
  • Disclaimer
  • Contact Us
  • Sitemap

Copyright © GeekCer 2022 All Rights reserved