Step 1: Installation process of eclipse and STS:
(i) Visit the following link: Download Here and select your os
e.g., I am downloading for window then I click on window x86_64
(ii) Then, click the Download button
(iii) when the download is completed open the eclipse installer for the system where you downloaded it.
(iv) Select the Eclipse IDE for Enterprise Java and Web Developers
(v) Click the install button:
(vi)Lunch the Eclipse and go to help and then choose the Eclipse Marketplace
(a)Install the Spring Tools 4 aka Spring Tool Suite 4
(viii)You will see installing software on the bottom right of your eclipse
(a)Let it install completely.
(b)After installation, restart the Eclipse.
Step:2 Now, we will create our first program in Spring Boot
(i)Open You Eclipse and go to file →new→Other then select Spring Starter Project and enter
for example, I gave the name HelloWorld
(iv)Here, select the dependencies according to your project requirement
I am selecting only two dependencies(Spring web and Spring Web Services which are required to create the hello world program.
(vii)You will see some dependencies downloading on the bottom right of your eclipse
(viii)Let it install completely, after downloading go to your project and create a package with the
name com.example.demo.Controller inside the folder src/main/java under the com. example.demo
(a)right click on the com.example.demo and go to New→Package and enter the name of the package
com.example.demo.Controller and press enter.
(ix)After creating a package, now we will create a Controller Class with the name HelloWorldContorller.
(a)right click on the com.example.demo.Controller and go to New→Class
(b)Enter the class name under the Name section and click the Finish button
(x) In the Class HelloWorldController.java write the following code
package com.example.demo.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloWorldController {
@RequestMapping("/hello")
public String printhello() {
return"Hello World";
}
}
(xi) Go to application.properties under the src/main/resources
(xii) Go to HelloWorldApplication.java under src/main/java→com.example.demo
and right-click and choose Run as →Spring Boot App
(xiii)When the application runs successfully, it shows a message in the console, as shown in the following figure.
(xiv)Open your browser and invoke the URL https://localhost:8080/hello and press enter it displays a String that we have specified in the Controller.


