Spring Boot MCQ Questions and Answers | Set 10


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?

a) To define a RESTful endpoint
b) To specify the table in the database to which the entity is mapped
c) To configure application properties
d) To create scheduled tasks

92. Which Spring Boot starter is used for integrating Apache Cassandra?

a) spring-boot-starter-cassandra
b) spring-boot-starter-data-cassandra
c) spring-boot-starter-jdbc
d) spring-boot-starter-data-redis

93. What is the primary use of the @ManyToOne annotation in JPA?

a) To define a many-to-one relationship between two entities
b) To configure application properties
c) To create scheduled tasks
d) To define RESTful endpoints

94. How can you define custom query methods in a Spring Data repository?

a) By using the @QueryMethod annotation
b) Through XML configuration
c) By declaring methods in the repository interface
d) By manually implementing the repository methods

95. What is the use of @OneToOne annotation in JPA?

a) To define a one-to-one relationship between two entities
b) To configure application properties
c) To create scheduled tasks
d) To define RESTful endpoints

96. What is the primary use of the @OneToMany annotation in JPA?

a) To define a one-to-many relationship between two entities
b) To configure application properties
c) To create scheduled tasks
d) To define RESTful endpoints

97. What is the role of the @Version annotation in a JPA entity?

a) To define a RESTful endpoint
b) To enable optimistic locking by marking a field as a version column
c) To configure application properties
d) To create scheduled tasks

98. How does Spring Boot simplify the integration with Apache Kafka?

a) By providing the spring-boot-starter-kafka dependency
b) Through manual configuration of Kafka clients
c) By embedding a Kafka server within the application
d) Through XML-based configuration

99. What is the purpose of the @Lob annotation in a JPA entity?

a) To define a large object (LOB) field in the database
b) To configure application properties
c) To create scheduled tasks
d) To define RESTful endpoints

100. How does Spring Boot support reactive data access?

a) By using the R2DBC API
b) Through the JdbcTemplate class
c) By manual reactive programming
d) Through XML-based configuration


Comments

Spring Boot 3 Paid Course Published for Free
on my Java Guides YouTube Channel

Subscribe to my YouTube Channel (165K+ subscribers):
Java Guides Channel

Top 10 My Udemy Courses with Huge Discount:
Udemy Courses - Ramesh Fadatare