当前位置:网站首页>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
- STM32 learning record 0007 - new project (based on register version)
- groutine
- UML统一建模语言
- crontab定时任务输出产生大量邮件耗尽文件系统inode问题处理
- Quartus Prime硬件实验开发(DE2-115板)实验二功能可调综合计时器设计
- Crontab timing task output generates a large number of mail and runs out of file system inode problem processing
- 零拷貝技術
- Business case | how to promote the activity of sports and health app users? It is enough to do these points well
- 第一章 电商秒杀商品回顾
猜你喜欢
随机推荐
村上春树 --《当我谈跑步时,我谈些什么》句子摘录
JMeter pressure test tool
趣谈网络协议
SSM project deployed in Alibaba cloud
【报名】TF54:工程师成长地图与卓越研发组织打造
程序编译调试学习记录
Express ② (routage)
Express ② (routing)
自动化的艺术
Multithreading
Quartus prime hardware experimental development (de2-115 board) experiment 1 CPU instruction calculator design
AtCoder Beginner Contest 248C Dice Sum (生成函数)
Interesting talk about network protocol
Reading notes: fedgnn: Federated graph neural network for privacy preserving recommendation
Problems encountered in the project (V) understanding of operating excel interface poi
MySQL [acid + isolation level + redo log + undo log]
Reading notes: Secure federated matrix factorization
神经元与神经网络
项目中遇到的问题(五)操作Excel接口Poi的理解
freeCodeCamp----time_ Calculator exercise