如何解决配置警告中不存在此类代码段
我正在使用Spring rest自动文档和asciidoc做文档。以下是我的错误消息
错误消息
Section snippet 'auto-method-path' is configured to be included in the section but no such snippet is present in configuration
Section snippet 'auto-description' is configured to be included in the section but no such snippet is present in configuration
正在生成自动方法路径,因此我不知道警告来自何处。但是自动描述是根据文档(控制器的javaDoc)进行的,因此我不知道为什么不生成此文档。
JavaDoc
/**
* Returns a Customer
*
* @param id the id of the customer
* @return the customer
*/
@GetMapping(path = "api/customer/{id}",produces = HAL_JSON_VALUE)
解决方法
已修复。我在Pom上缺少此内容:
<execution>
<id>generate-javadoc-json</id>
<phase>compile</phase>
<goals>
<goal>javadoc-no-fork</goal>
</goals>
<configuration>
<doclet>capital.scalable.restdocs.jsondoclet.ExtractDocumentationAsJsonDoclet</doclet>
<docletArtifact>
<groupId>capital.scalable</groupId>
<artifactId>spring-auto-restdocs-json-doclet</artifactId>
<version>2.0.9</version>
</docletArtifact>
<destDir>generated-javadoc-json</destDir>
<reportOutputDirectory>${project.build.directory}</reportOutputDirectory>
<useStandardDocletOptions>false</useStandardDocletOptions>
<show>package</show>
</configuration>
</execution>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。