Додати до Chrome
✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
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
Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!