Test The Controller With @WebMvcTest
Let’s learn to test the controller layer by using Spring Framework's @WebMvcTest annotation.
We'll cover the following
We can use the @WebMvcTest
annotation to test the controller layer, in a similar way to how we used @DataJpaTest
for JPA tests.
Get hands-on with 1400+ tech skills courses.