当前位置:网站首页>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
边栏推荐
- leetcode--977. Squares of a Sorted Array
- 2022年江西最新建筑八大员(质量员)模拟考试题库及答案解析
- 低频量化之明日涨停预测
- Express②(路由)
- Force deduction brush question 101 Symmetric binary tree
- About note 1
- MySQL [read / write lock + table lock + row lock + mvcc]
- 大专的我,闭关苦学 56 天,含泪拿下阿里 offer,五轮面试,六个小时灵魂拷问
- [code analysis (7)] communication efficient learning of deep networks from decentralized data
- Reading notes: Secure federated matrix factorization
猜你喜欢

UML Unified Modeling Language

Question bank and answer analysis of the 2022 simulated examination of the latest eight members of Jiangxi construction (quality control)

scikit-learn構建模型的萬能模板

STM32学习记录0007——新建工程(基于寄存器版)

Universal template for scikit learn model construction

go 语言 数组,字符串,切片

The art of automation

SQL learning | complex query

redis如何解决缓存雪崩、缓存击穿和缓存穿透问题

大专的我,闭关苦学 56 天,含泪拿下阿里 offer,五轮面试,六个小时灵魂拷问
随机推荐
力扣刷题 101. 对称二叉树
What is the difference between blue-green publishing, rolling publishing and gray publishing?
快捷键(多行)
Spark入门基本操作
蓝绿发布、滚动发布、灰度发布,有什么区别?
UML统一建模语言
第十五章 软件工程新技术
服务器中挖矿病毒了,屮
Interesting talk about network protocol
Express middleware ③ (custom Middleware)
Analysis and understanding of atomicintegerarray source code
Force deduction brush question 101 Symmetric binary tree
1256:献给阿尔吉侬的花束
Dynamic subset division problem
Building MySQL environment under Ubuntu & getting to know SQL
[code analysis (3)] communication efficient learning of deep networks from decentralized data
Jiannanchun understood the word game
Basic knowledge learning record
容差分析相关的计算公式
Quartus prime hardware experimental development (de2-115 board) experiment II function adjustable comprehensive timer design