1

我正在使用 Spring Rest Doc,我可以看到我的 .adoc 文件在我指定的路径中正确生成

public JUnitRestDocumentation restDocumentation =
        new JUnitRestDocumentation("target/generated-snippets");

现在我想在启动服务器时看到它的实际效果。

我的 MockMvc 看起来像这样

this.mockMvc = MockMvcBuilders.standaloneSetup(testController)
            .apply(documentationConfiguration(this.restDocumentation))
            .alwaysDo(document("{method-name}/{step}/"))
            .build();

我正在尝试获取 localhost:8080/target/generated-snippet 或 localhost:8080/retrivedocumentation 等文档的路径,但我看不到它。我在网上找到的文档没有指定它。有谁知道如何找回它?

谢谢

4

1 回答 1

3

假设您已遵循用户指南说明:打包文档,那么您将找到文档以及其他静态 Web 资源:

http://localhost:8080/docs/index.html

于 2017-07-27T15:31:31.923 回答