请访问:https://docs.spring.io/spring-security/reference/6.3/servlet/test/mockmvc/setup.html Spring Security Servlet Applications Testing MockMvc Setup MockMvc Support Security RequestPostProcessors