Spring集成Smart-Doc
概要
` 提示:根据官方使用手册,集成Smart-Doc
smart-doc官方文档:
写接口文档是一个重活,但是用这个完全基于注释,轻松不少
架构流程
使用maven插件:
<plugin>
<groupId>com.github.shalousun</groupId>
<artifactId>smart-doc-maven-plugin</artifactId>
<version>2.2.7</version>
<configuration>
<!--指定生成文档使用的配置文件-->
<configFile>./src/main/resources/smart-doc.json</configFile>
</configuration>
<executions>
<execution>
<!--不需要在编译项目时自动生成文档可注释phase-->
<phase>compile</phase>
<goals>
<goal>html</goal>
</goals>
</execution>
</executions>
</plugin>
配置文件
{
"serverUrl": "http://127.0.0.1",
"isStrict": false,
"allInOne": true,
"outPath": "src/main/resources/static/doc",
"projectName": "smart-doc"
}
小结
点击所需要的格式,enjoy it!