The _____ annotation in Spring Boot is used to test only the web layer by disabling full auto-configuration and applying only relevant web configurations.

  • @DataJpaTest
  • @RestController
  • @SpringBootTest
  • @WebMvcTest
In Spring Boot, the @WebMvcTest annotation is used for testing the web layer. It disables full auto-configuration and focuses on relevant web configurations, making it ideal for testing web components like controllers.
Add your answer
Loading...

Leave a comment

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