Spring Boot Interview Questions and Answers
| Spring vs Spring Boot | NodeJS vs Spring Boot | Spring MVC vs Spring Boot |
Ques 21. What is the primary difference between Spring and Spring Boot?
Spring is a web application development framework based on Java. On the other hand Spring Boot is an extension of the spring framework which eliminated the boilerplate configuration required for setup a Spring application.
Ques 22. Explain Spring Boot Admin.
Spring Boot admin is a community project which helps you to manage and monitor your Spring Boot applications.
Ques 23. How can you connect Spring Boot to the database using JPA?
Spring Boot supports spring-boot-starter-data-jpa, which helps you to connect spring application with a relational database.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>2.2.2.RELEASE</version>
</dependency>
Ques 24. Explain @RestController annotation in Spring Boot?
The @RestController annotation helps you to add @ResponseBody and @Controller annotations to the class to write RESTFul web service APIs.
You can also import org.springframework.web.bind.annotation package in your file.
Ques 25. Explain Spring CLI.
Spring CLI is used for writing in Groovy Spring Boot application, which helps you to concise code.