What is Spring Boot Framework ? Why it is used and how it is beneficial over other spring framework?
First, let’s understand the spring framework here.
What’s on this page: Spring Boot Features | Writing your first Spring Boot Application
What is Spring Boot ? It's an open source framework which is used to built stand-alone, production ready spring based applications that you can run it with minimal config. In Simplest form, using Spring Boot with minimum config we can create production ready application with ease. It's the combination of embedded server and basic configuration.

In Spring boot, it provides us the following Features:
Embedded tomcat/jetty/undertow server on which we can run our applications.
Starter dependencies.
Automatic configuration of spring and dependencies.
Production ready features like health checks and metrics.
Properties files and YAML support.
Logging and security
Writing your first spring boot application:
Let’s start writing our first sprint boot app,
What are the prerequisites
Java JDK 1.8 or above
Gradle or Maven
IDE of your choice (IntelliJ for this tutorial)
Now let’s start with spring Initializr and download a pre-initialized project zip file OR manually go to https://start.spring.io set the Gradle or Mayen (we are using Mayen in these tutorials) choose Java version and in dependencies section choose Spring Web and click on GENERATE to download the zip file.

After downloading the zip file, extract it and open it in your IDE. Run Maven clean install to install the dependencies PSB:

Run it, you will see dependencies getting downloaded like this, and you will see build success at the end.


After build success, open your application class and run it.


That means you successfully launched your spring boot application.
Details:
@SpringBootApplication Annotation is the combination of @Configuration, @EnableAutoConfiguration and @ComponentScan.
Creating Spring Boot Web Application:
Now, with the above example, we will modify it to make it a web application and will create one rest service saying hello.
First, open pom.xml and add spring web dependency if it’s not available there.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
Create one package controller under that we will create a controller class and annotate it with @RestController annotation:

In this controller class, we will create get mapping for hello and returns back the string saying hello back to the user.

Now run this application using main class “Application.java” and look for the console to see the status:

It says our application is up and running on port: 8080 now let’s open the browser and hit the URL to see the output:

/hello is what we have added in get mapping and we can see the expected output. Congratulations! You just created your first spring boot web/rest application.
Checkout the code from git: