🎓 Top 15 Udemy Courses (80-90% Discount): My Udemy Courses - Ramesh Fadatare — All my Udemy courses are real-time and project oriented courses.
▶️ Subscribe to My YouTube Channel (178K+ subscribers): Java Guides on YouTube
▶️ For AI, ChatGPT, Web, Tech, and Generative AI, subscribe to another channel: Ramesh Fadatare on YouTube
Welcome to Set 10 of our 100+ Spring Boot MCQ Questions and Answers series. This Set 10 continues from MCQs 91-100 and covers Spring Boot and Spring framework modules.
Complete Spring Boot MCQ Questions and Answers series:
Spring Boot MCQ Questions and Answers | Set 1
Spring Boot MCQ Questions and Answers | Set 2
Spring Boot MCQ Questions and Answers | Set 3
Spring Boot MCQ Questions and Answers | Set 4
Spring Boot MCQ Questions and Answers | Set 5
Spring Boot MCQ Questions and Answers | Set 6
Spring Boot MCQ Questions and Answers | Set 7
Spring Boot MCQ Questions and Answers | Set 8
Spring Boot MCQ Questions and Answers | Set 9
Spring Boot MCQ Questions and Answers | Set 10
91. What is the role of the @Table annotation in a JPA entity?
Answer:
Explanation:
The @Table annotation in a JPA entity is used to specify the table in the database to which the entity should be mapped. It can include the table name, catalog, schema, and unique constraints.
92. Which Spring Boot starter is used for integrating Apache Cassandra?
Answer:
Explanation:
The spring-boot-starter-data-cassandra starter is used for integrating Apache Cassandra, a NoSQL database, into Spring Boot applications. It includes support for Cassandra operations and configurations.
93. What is the primary use of the @ManyToOne annotation in JPA?
Answer:
Explanation:
The @ManyToOne annotation in JPA is used to define a many-to-one relationship between two entities. It specifies that many entities are mapped to one target entity.
94. How can you define custom query methods in a Spring Data repository?
Answer:
Explanation:
Custom query methods in a Spring Data repository can be defined by declaring methods in the repository interface. Spring Data derives the query from the method name or uses the provided @Query annotation.
95. What is the use of @OneToOne annotation in JPA?
Answer:
Explanation:
The @OneToOne annotation in JPA is used to define a one-to-one relationship between two entities. It indicates that one entity is associated with another entity having a one-to-one relationship.
96. What is the primary use of the @OneToMany annotation in JPA?
Answer:
Explanation:
The @OneToMany annotation in JPA is used to define a one-to-many relationship between two entities. It specifies that one entity is associated with multiple instances of another entity.
97. What is the role of the @Version annotation in a JPA entity?
Answer:
Explanation:
The @Version annotation in a JPA entity is used to enable optimistic locking by marking a field as a version column. This field is used to ensure data integrity during concurrent updates.
98. How does Spring Boot simplify the integration with Apache Kafka?
Answer:
Explanation:
Spring Boot simplifies the integration with Apache Kafka by providing the spring-boot-starter-kafka dependency. It includes support for Kafka template and consumer/producer configurations.
99. What is the purpose of the @Lob annotation in a JPA entity?
Answer:
Explanation:
The @Lob annotation in a JPA entity is used to define a Large Object (LOB) field in the database, such as a BLOB (Binary Large Object) or CLOB (Character Large Object).
100. How does Spring Boot support reactive data access?
Answer:
Explanation:
Spring Boot supports reactive data access by using the R2DBC (Reactive Relational Database Connectivity) API. It provides non-blocking and reactive programming support for relational databases.
❮ Previous Set Go to Main Spring Boot MCQ Page❯
My Top and Bestseller Udemy Courses. The sale is going on with a 70 - 80% discount. The discount coupon has been added to each course below:
Build REST APIs with Spring Boot 4, Spring Security 7, and JWT
[NEW] Learn Apache Maven with IntelliJ IDEA and Java 25
ChatGPT + Generative AI + Prompt Engineering for Beginners
Spring 7 and Spring Boot 4 for Beginners (Includes 8 Projects)
Available in Udemy for Business
Building Real-Time REST APIs with Spring Boot - Blog App
Available in Udemy for Business
Building Microservices with Spring Boot and Spring Cloud
Available in Udemy for Business
Java Full-Stack Developer Course with Spring Boot and React JS
Available in Udemy for Business
Build 5 Spring Boot Projects with Java: Line-by-Line Coding
Testing Spring Boot Application with JUnit and Mockito
Available in Udemy for Business
Spring Boot Thymeleaf Real-Time Web Application - Blog App
Available in Udemy for Business
Master Spring Data JPA with Hibernate
Available in Udemy for Business
Spring Boot + Apache Kafka Course - The Practical Guide
Available in Udemy for Business
Comments
Post a Comment
Leave Comment