问题
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?
来源:https://stackoverflow.com/questions/36419353/spring-requestbodyadvice-is-not-picking-up-by-the-mock-mvc-frame-work-how-ever