<java.lang.IllegalStateException(Method not found)...
# stackoverflow
u
java.lang.IllegalStateException(Method not found): Calling MockMvc.perform multiple time in one test with customized Filter For retrieving UserDetails object in spring security protected REST api with @AuthenticationPrincipal annotation, I add a customized filter in the MockMvc object, something likes: @ExtendWith(SpringExtension::class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) class BaseSpringIntegrationTest { @Autowired private lateinit var context: WebApplicationContext lateinit var mockMvc: MockMvc val mockUser =...