【发布时间】:2016-03-25 10:30:41
【问题描述】:
我正在尝试将 Spring Rest Docs 包含在 Spring Boot 应用程序中,并设法生成了一个简单的 asciidoc HTML 文件,该文件显示了应用程序根目录“/”的请求路径。问题是sn -p中的请求URL不包含应用名称?例如,我的应用程序称为“myservice”,因此我希望将根“/”请求路径记录为
$ curl 'http://localhost:8080/myservice/'
我只能生成
$ curl 'http://localhost:8080/'
我是 Spring Rest Docs 的新手,无法弄清楚如何在记录的 URL 中包含应用程序名称。它是在 asccidoctor 的 maven 插件中、在测试类的 @before 或 @Test 方法中还是在 .adoc 文件中作为“包含”标签的一部分设置的?
【问题讨论】:
标签: spring-mvc spring-boot asciidoctor spring-restdocs