The @WebMvcTest annotation in Spring Boot will _____ any @Component, @Service, and @Repository beans by default.
- Annotate
- Disable
- Exclude
- Include
The @WebMvcTest annotation in Spring Boot includes, by default, only the beans annotated with @Controller, @ControllerAdvice, @JsonComponent, and Converter beans. It does not include @Component, @Service, and @Repository beans.
Loading...
Related Quiz
- How can you handle exceptions globally across multiple controllers in a Spring Boot application?
- You are working on a Spring Boot application with multiple service components interacting with each other. How would you isolate and test a single service component ensuring that the interactions with other components are not affecting the test results?
- How can you customize the UserDetailsService in Spring Security to load user information from a different source?
- How would you design a Spring Cloud application to handle failovers and service unavailability, ensuring minimal impact on the user experience?
- How would you implement a custom caching strategy in Spring Boot if the default ones do not meet your requirements?