当前位置:网站首页>smart-doc + torna生成接口文档
smart-doc + torna生成接口文档
2022-04-23 14:00:00 【白云碎里一蓑舟】
一、集成pom插件
<!-- smart-doc + torna生成接口文档-->
<plugin>
<groupId>com.github.shalousun</groupId>
<artifactId>smart-doc-maven-plugin</artifactId>
<version>2.3.0</version>
<configuration>
<!--指定生成文档的使用的配置文件,配置文件放在自己的项目中-->
<configFile>./src/main/resources/smart-doc.json</configFile>
<!--指定项目名称-->
<projectName>项目名称</projectName>
<!--smart-doc实现自动分析依赖树加载第三方依赖的源码,如果一些框架依赖库加载不到导致报错,这时请使用excludes排除掉-->
<excludes>
<!--格式为:groupId:artifactId;参考如下-->
<exclude>com.alibaba:fastjson</exclude>
</excludes>
<!--自1.0.8版本开始,插件提供includes支持,配置了includes后插件会按照用户配置加载而不是自动加载,因此使用时需要注意-->
<!--smart-doc能自动分析依赖树加载所有依赖源码,原则上会影响文档构建效率,因此你可以使用includes来让插件加载你配置的组件-->
<includes>
<!--格式为:groupId:artifactId;参考如下-->
<include>com.alibaba:fastjson</include>
</includes>
</configuration>
<executions>
<execution>
<!--如果不需要在执行编译时启动smart-doc,则将phase注释掉-->
<phase>compile</phase>
<goals>
<!--smart-doc提供了html、openapi、markdown等goal,可按需配置-->
<goal>html</goal>
</goals>
</execution>
</executions>
</plugin>
二、 新建json文件 ==》 ./src/main/resources/smart-doc.json
{
"serverUrl": "http://---------:8080/product",
"outPath": "C:\\Users\\11827\\Desktop\\doc\\smart-doc",
"isStrict": false,
"coverOld": true,
"showAuthor": true,
"inlineEnum":true,
"packageFilters": "com.xycm.mall.product.controller",
"projectName": "商品",
"appKey": "a---------------",
"appToken": "a---------------",
"secret": "a---------------",
"debugEnvName":"开发环境",
"debugEnvUrl":"http://---------:8080/product",
"openUrl": "http://---------:7777/api",
"author": "大帅哥"
}
三、 maven点击上传
成功,奶思~
版权声明
本文为[白云碎里一蓑舟]所创,转载请带上原文链接,感谢
https://blog.csdn.net/m0_49513507/article/details/121352943
边栏推荐
- Android: answers to the recruitment and interview of intermediate Android Development Agency in early 2019 (medium)
- Function executes only the once function for the first time
- Leetcode brush question 897 incremental sequential search tree
- Port occupied 1
- About note 1
- Jenkins construction and use
- FDFS start
- go 语言 数组,字符串,切片
- Force deduction brush question 101 Symmetric binary tree
- try --finally
猜你喜欢
随机推荐
Strange bug of cnpm
编程旅行之函数
Universal template for scikit learn model construction
Using Baidu Intelligent Cloud face detection interface to achieve photo quality detection
Quartus Prime硬件实验开发(DE2-115板)实验二功能可调综合计时器设计
快捷键(多行)
基础知识学习记录
Leetcode | 38 appearance array
Introduction to spark basic operation
Reading notes: meta matrix factorization for federated rating predictions
Express②(路由)
Record a strange bug: component copy after cache component jump
Move blog to CSDN
Android篇:2019初中级Android开发社招面试解答(中
Problems encountered in the project (V) understanding of operating excel interface poi
Android: answers to the recruitment and interview of intermediate Android Development Agency in early 2019 (medium)
leetcode--977. Squares of a Sorted Array
Leetcode brush question 𞓜 13 Roman numeral to integer
[code analysis (5)] communication efficient learning of deep networks from decentralized data
Tensorflow Download