Spring RequestBodyAdvice is not picking up by the mock MVC frame work, how ever it is working for ResponseBodyAdvice
问题 We are using Spring 4.2.0-RELEASE and implementing RequestBodyAdvice and ResponseBodyAdvice advices to parse the request and response bodies. When we try to write the mock unit tests using spring test frame work, it is picking up only the Response body advice and not reuqestBodyadvice advices[0] = testRequestBodyAdvice; advices[1] = testResponseBodyAdvice; mockMvc = MockMvcBuilders.standaloneSetup(authTokenController). setControllerAdvice(advices).build(); Are we missing any thing here? 来源: