For unit testing repositories in Spring Boot, the _____ annotation is used to disable full auto-configuration and instead apply only configuration relevant to JPA tests.
- @DataJpaTest
- @RunWith
- @SpringBootTest
- @WebMvcTest
The @DataJpaTest annotation is used to test JPA repositories in Spring Boot. It disables full auto-configuration and sets up only the configuration relevant to JPA tests, making it ideal for repository testing.
Loading...
Related Quiz
- Which Spring Cloud component is primarily used for service discovery in a microservices architecture?
- For custom validation logic in Spring Boot, the _____ method of the ConstraintValidator interface needs to be implemented.
- In connection pooling, what does the term "Maximum Pool Size" refer to?
- In which scenario would you choose WebFlux over the traditional blocking architecture in Spring Boot?
- How can database query optimization improve the performance of a Spring Boot application interacting with a database?