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.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *