Spring Boot Interview questions - LearnHowToCode SarkariResult.com Interview Questions and Answers LearnHowToCodeOnline
Spring Boot Interview questions

Spring Boot Interview questions

Spring Boot Interview questions

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 a stand-alone spring based application that you can just run because it needs very little spring configuration.

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 configures Spring whenever possible.

What are the features of Spring Boot?

  • Web Development
  • SpringApplication
  • Application events and listeners
  • Admin features

How to create Spring Boot application using Maven?

There are multiple approaches to create a Spring Boot project. We can use any of the following approaches to creating an application.
  • Spring Maven Project
  • Spring Starter Project Wizard
  • Spring Initializr
  • Spring Boot CLI
What Is @RestController annotation in Spring Boot?
The @RestController is a stereotype annotation.

What Is @RequestMapping annotation in Spring Boot?
The @RequestMapping annotation is used to provide routing information

What Is Spring MVC?
Spring MVC is a traditional web application framework that helps you to build web applications. It is similar to Struts framework.

Is spring boot an MVC?
Spring Web MVC is a feature of the core Spring Framework — MVC (Model View Controller) is a software engineering design pattern, commonly used in designing web applications.

How to disable Actuator endpoint security in Spring Boot?By default, all sensitive HTTP endpoints are secured such that only users that have an ACTUATOR role may access them. Security is enforced using the standard HttpServletRequest.isUserInRole method.
We can disable security using - 
management.security.enabled=false
It is suggested to disable security only if the actuator endpoints are accessed behind the firewall.

How to run Spring boot application to custom port?In order to run a spring boot application on a custom port, you can specify the port in application.properties.
server.port=8090 

Have you written Test cases using Spring Boot?Spring Boot provides the @SpringBootTest for writing Unit Test Cases


What is YAML?YAML is a human-readable data serialization language. It is commonly used for configuration files.
Compared to the properties file, YAML file is much more structured and less confusing in case we want to add complex properties in the configuration file. As can be seen, YAML has hierarchical configuration data. 

How to implement security for Spring boot application?For Implementing security for Spring Boot we use the spring-boot-starter-security dependency and have to add the Security config. It requires very little code. Config class will have to extend WebSecurityConfigurerAdapter and override its methods.


Have you integrated Spring Boot and ActiveMQ?For integrating Spring Boot and ActiveMQ we use the spring-boot-starter-ActiveMQ dependency
It requires very little configuration and no boilerplate code.


Have you integrated Spring Boot and Apache Kafka?For integrating Spring Boot and Apache Kafka we use the spring-Kafka dependency.

How to implement Pagination and Sorting with Spring Boot?Using Spring Boot achieving pagination is very simple. Using the Spring Data-JPA this is achieved passing pageable org.springframework.data.domain.Pageable to the repository methods.



About Mariano

I'm Ethan Mariano a software engineer by profession and reader/writter by passion.I have good understanding and knowledge of AngularJS, Database, javascript, web development, digital marketing and exploring other technologies related to Software development.

0 comments:

Featured post

Political Full Forms List

Acronym Full Form MLA Member of Legislative Assembly RSS Really Simple Syndication, Rashtriya Swayamsevak Sangh UNESCO United Nations E...

Powered by Blogger.