Add to Chrome
✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
How can you test a REST controller in Spring Boot without starting the entire application context?
By using the @SpringBootTest annotation
@SpringBootTest
@RestControllerTest
By using the @WebMvcTest annotation
@WebMvcTest
By using the @MockBean annotation
@MockBean
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!