In Spring Boot, which annotation is used to denote that a test class should load only specific parts of the application context for Web tests?

  • @ContextConfiguration
  • @SpringBootTest
  • @WebAppConfiguration
  • @WebMvcTest
The @WebMvcTest annotation is used to load only the Web layer of the Spring application context, making it suitable for testing controllers and related components.
Add your answer
Loading...

Leave a comment

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