0
我試圖以產生基於spring-restdocs彈簧restdocs是不承認適用()
一個REST API文檔,在下面的代碼我得到一個編譯時錯誤適用()
將該方法應用(RestDocumentationMockMvcConfigurer)是未定義的類型DefaultMockMvcBuilder
@ContextConfiguration(locations = { "classpath:/testApplicationRestService.xml" })
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
public class CustomerControllerTest {
@Rule
public final RestDocumentation restDocumentation = new RestDocumentation(
"build/generated-snippets");
@Autowired
private WebApplicationContext context;
private MockMvc mockMvc;
@Before
public void setUp() {
this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context)
.apply(documentationConfiguration(this.restDocumentation))
.build();
}
}
是的,你是對的,我正在使用4.0.1。 –