0
我在JUnit Test中使用MvcResult類...如何獲取返回的對象?從MvcResult對象獲取響應
MvcResult r = this.mockMvc.perform(get("/aaaa?page=1&size=1&status=aaa").accept(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
.andReturn();
MockHttpServletResponse response = r.getResponse();