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

  • ACID Properties in Hindi? ACID Properties क्या है?
    ACID Properties in Hindi? ACID Properties क्या है? Important
  • World Environment Day in Hindi : Objective, Importance, Theme
    World Environment Day in Hindi : Objective, Importance, Theme General Knowledge
  • What is International Monetary Fund (I.M.F.)
    What is International Monetary Fund (I.M.F.)? Important
  • Apj Abdul Kalam biography in Hindi, Life, Missile Man of India
    Apj Abdul Kalam biography in Hindi, Life, Missile Man of India Biography
  • Java Keywords
    Java Keywords Java
  • List Of National Animals Of Countries
    List Of National Animals Of Countries General Knowledge
  • Vedaant Madhavan Biography in Hindi, Family, School, Age
    Vedaant Madhavan Biography in Hindi, Family, School, Age Biography
  • String Array in C | What is an array of string | String Functions
    String Array in C | What is an array of string | String Functions C Language

Spring Initializr for Spring Boot Project

Posted on October 16, 2021October 16, 2021 By admin 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

Spring Boot Tutorial Spring Boot Tutorial Spring Boot
Top Spring Boot Annotations Top Spring Boot Annotations Spring Boot
Bean Scopes in Spring, Types of Bean Scopes, Examples Bean Scopes in Spring, Types of Bean Scopes, Examples Spring
HTTP status codes List | Response Status Code Glossary HTTP status codes List | Response Status Code Glossary Important

Related Posts

  • Spring Boot Tutorial
    Spring Boot Tutorial Spring Boot
  • Top Spring Boot Annotations
    Top Spring Boot Annotations Spring Boot
  • Bean Scopes in Spring, Types of Bean Scopes, Examples
    Bean Scopes in Spring, Types of Bean Scopes, Examples Spring
  • 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 *

Recent Posts

  • Maharishi Valmiki in Hindi, Biography, Dacoit Ratnakar, Jayanti
  • Structured Vs Unstructured Data in Hindi | Key Difference
  • Jhansi Ki Rani Lakshmi Bai History, Story, Information in Hindi
  • Elon musk Hindi : एलन मस्क हिंदी में, Autobiography,  Net Worth
  • World Environment Day in Hindi : Objective, Importance, Theme
  • Thomas Edison Biography in Hindi – थॉमस एडिसन जीवनी
  • International Nurses Day in Hindi | नर्स दिवस क्यों मनाते हैं?
  • Fork/Join Framework in Java | RecursiveTask, RecursiveAction
  • ACID Properties in Hindi? ACID Properties क्या है?
    ACID Properties in Hindi? ACID Properties क्या है? Important
  • World Environment Day in Hindi : Objective, Importance, Theme
    World Environment Day in Hindi : Objective, Importance, Theme General Knowledge
  • What is International Monetary Fund (I.M.F.)
    What is International Monetary Fund (I.M.F.)? Important
  • Apj Abdul Kalam biography in Hindi, Life, Missile Man of India
    Apj Abdul Kalam biography in Hindi, Life, Missile Man of India Biography
  • Java Keywords
    Java Keywords Java
  • List Of National Animals Of Countries
    List Of National Animals Of Countries General Knowledge
  • Vedaant Madhavan Biography in Hindi, Family, School, Age
    Vedaant Madhavan Biography in Hindi, Family, School, Age Biography
  • String Array in C | What is an array of string | String Functions
    String Array in C | What is an array of string | String Functions C Language
  • 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