Which annotation is used to disable full auto-configuration and instead apply only configuration relevant to JPA tests in Spring Boot?

  • @AutoConfigureTestDatabase
  • @JpaTest
  • @RunWith(SpringRunner.class)
  • @SpringBootTest
The @JpaTest annotation is used in Spring Boot to disable full auto-configuration and apply configuration relevant to JPA tests. It sets up an environment for testing JPA repositories. @SpringBootTest and @RunWith(SpringRunner.class) are more general-purpose testing annotations, while @AutoConfigureTestDatabase is used for configuring the test database.
Add your answer
Loading...

Leave a comment

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