Spring Boot
1) What is Spring Boot?
Spring Boot is a Spring module which provides RAD (Rapid Application Development) feature to Spring framework.
It is used to create stand alone spring based application that you can just run because it needs very little spring configuration.
2) What are the advantages of Spring Boot?
Create stand-alone Spring applications that can be started using java -jar.
Embed Tomcat, Jetty or Undertow directly. You don’t need to deploy WAR files.
It provides opinionated ‘starter’ POMs to simplify your Maven configuration.
It automatically configure Spring whenever possible.
3) What are the features of Spring Boot?
Web Development
SpringApplication
Application events and listeners
Admin features
4) How to create Spring Boot application using Maven?
There are multiple approaches to create Spring Boot project. We can use any of the following approach to create application.
Spring Maven Project
Spring Starter Project Wizard
Spring Initializr
Spring Boot CLI
.
5) How to create Spring Boot project using Spring Initializer?
It is a web tool which is provided by Spring on official site. You can create Spring Boot project by providing project details.
6) How to create Spring Boot project using boot CLI?
It is a tool which you can download from the official site of Spring Framework. Here, we are explaining steps.
Download the CLI tool from official site and .
7) How to create simple Spring Boot application?
To create an application. We are using STS (Spring Tool Suite) IDE and it includes the various steps that are explaining in steps.
.
8) What are the Spring Boot Annotations?
The @RestController is a stereotype annotation. It adds @Controller and @ResponseBody annotations to the class. We need to import org.springframework.web.bind.annotation package in our file, in order to implement it.

.
9) What is Spring Boot dependency management?
Spring Boot manages dependencies and configuration automatically. You don’t need to specify version for any of that dependencies.
Spring Boot upgrades all dependencies automatically when you upgrade Spring Boot.
.
10) What are the Spring Boot properties?
Spring Boot provides various properties which can be specified inside our project’s application.properties file. These properties have default values and you can set that inside the properties file. Properties are used to set values like: server-port number, database connection configuration etc.
.
11) What are the Spring Boot Starters?
Starters are a set of convenient dependency descriptors which we can include in our application.
Spring Boot provides built-in starters which makes development easier and rapid. For example, if we want to get started using Spring and JPA for database access, just include the spring-boot-starter-data-jpa dependency in your project.
12) What is Spring Boot Actuator?
Spring Boot provides actuator to monitor and manage our application. Actuator is a tool which has HTTP endpoints. when application is pushed to production, you can choose to manage and monitor your application using HTTP endpoints.
13) What is thymeleaf?
It is a server side Java template engine for web application. It’s main goal is to bring elegant natural templates to your web application.
It can be integrate with Spring Framework and ideal for HTML5 Java web applications.
14) How to use thymeleaf?
In order to use Thymeleaf we must add it into our pom.xml file like:
org.springframework.boot spring-boot-starter-thymeleaf
.
16) How to connect Spring Boot application to database using JDBC?
Spring Boot provides starter and libraries for connecting to our application with JDBC. Here, we are creating an application which connects with Mysql database. It includes the following steps to create and setup JDBC with Spring Boot.
15) What is @RestController annotation in Spring Boot?
The @RestController is a stereotype annotation. It adds @Controller and @ResponseBody annotations to the class. We need to import org.springframework.web.bind.annotation package in our file, in order to implement it.
17) How to connect Spring Boot to the database using JPA?
Spring Boot provides spring-boot-starter-data-jpa starter to connect Spring application with relational database efficiently. You can use it into project POM (Project Object Model) file.
.
.
18) What is @RequestMapping annotation in Spring Boot?
The @RequestMapping annotation is used to provide routing information. It tells to the Spring that any HTTP request should map to the corresponding method. We need to import org.springframework.web.annotation package in our file.
.
19) How to create Spring Boot application using Spring Starter Project Wizard?
There is one more way to create Spring Boot project in STS (Spring Tool Suite). Creating project by using IDE is always a convenient way. Follow the following steps in order to create a Spring Boot Application by using this wizard.
.
Leave a Reply