- SpringBoot接口 - 如何生成接口文档之非侵入方式(通过注释生成)Smart-Doc?
- SpringBoot接口 - 如何生成接口文档之非侵入方式(通过注释生成)Smart-Doc?
- Spring Boot 整合 Smart-Doc的详细过程(零注解生成 API 文档,告别 Swagger)
- smart-doc quick-start
- smart-doc use-idea
pom.xml
<plugin>
<groupId>com.github.shalousun</groupId>
<artifactId>smart-doc-maven-plugin</artifactId>
<version>2.6.4</version>
<configuration>
<configFile>./src/main/resources/smart-doc.json</configFile>
<projectName>${project.description}</projectName>
<includes>
<!-- Page paging using mybatis-plus requires the source code package used by include -->
<include>com.baomidou:mybatis-plus-extension</include>
<!-- IPage paging using mybatis-plus needs to include mybatis-plus-core-->
<include>com.baomidou:mybatis-plus-core</include>
<!-- Paging using jpa requires the source code package used by include -->
<include>org.springframework.data:spring-data-commons</include>
</includes>
</configuration>
<executions>
<execution>
<!--If you do not need to start smart-doc when compiling, comment out phase-->
<phase>compile</phase>
<goals>
<!--smart-doc provides html, openapi, markdown and other goals, which can be configured as needed-->
<goal>html</goal>
</goals>
</execution>
</executions>
</plugin>
./src/main/resources/smart-doc.json
{
"outPath": "D://md2" //Specify the output path of the document
}
how to use
Directly use the
smart-doc
module in theMaven
plug-in directory inIDEA
Execute in command line
mvn -Dfile.encoding=UTF-8 smart-doc:html
mvn -Dfile.encoding=UTF-8 smart-doc:markdown
mvn -Dfile.encoding=UTF-8 smart-doc:torna-rest
...