The documentation at 19.2.2 demonstrates how to use the jwt() processor to test security rules under MockMvc, but it doesn't state anywhere which class provides that static import; it should explicitly name SecurityMockMvcRequestPostProcessors somewhere in the section.
Comment From: jgrandja
@chrylis Section 19.2.2. SecurityMockMvcRequestPostProcessors documents the following at the start:
Spring MVC Test provides a convenient interface called a RequestPostProcessor that can be used to modify a request. Spring Security provides a number of RequestPostProcessor implementations that make testing easier. In order to use Spring Security’s RequestPostProcessor implementations ensure the following static import is used:
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.*;
The static import is specified and applies to all RequestPostProcessor support, including jwt().
I'll close this as it's already documented.