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.
Loading...
Related Quiz
- To resolve ambiguity and specify which bean should be wired when there are multiple beans of the same type, one can use the _____ annotation in Spring
- In Spring Boot, when testing service layer components, the _____ annotation can be used to avoid loading the complete ApplicationContext.
- What is the primary role of an OAuth2 Authorization Server in a Spring Boot application?
- Which annotation is used to denote a test method in JUnit?
- The _____ file is crucial for defining custom Auto Configuration classes in Spring Boot.