Interview Questions and Answers
Intermediate / 1 to 5 years experienced level questions & answers
Ques 1. How can you change JDK version in Spring Boot?
<properties>
<java.version>11</java.version>
</properties>
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Ques 2. What is Spring Boot starter? How is it useful?
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Ques 3. How can you access a value defined in the application? What is properties file in Spring Boot?
@Value(”${custom.value}”)private String customVal;
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Ques 4. 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.
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Ques 5. 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.
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Ques 6. What is the main difference between JPA and Hibernate?
The main difference between both of them is that JPA is a specification/Interface, whereas Hibernate is only JPA implementations.
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Ques 7. What are Spring Boot Starter Projects?
Starters in Spring Boot are a set of convenient descriptors that are included in Spring Boot applications. It comes with a variety of Spring-related technology which makes the entire process of the application development much easier.
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Ques 8. What is @pathVariable?
@PathVariable annotation helps you to extract information from the URI directly.
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Ques 9. How to scan all the beans and package declarations in Spring Boot?
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Most helpful rated by users:
- What is Spring Boot?
- How to scan all the beans and package declarations in Spring Boot?
- What are embedded containers support by Spring?
- What are the advantages of microservice?
- Mention some advantages of Spring Boot.