springboot2使用Swagger2Markup实现导出API文档(3)

参考文档:使用Swagger2Markup实现导出API文档-腾讯云开发者社区-腾讯云

githubGitHub - Swagger2Markup/swagger2markup: A Swagger to AsciiDoc or Markdown converter to simplify the generation of an up-to-date RESTful API documentation by combining documentation that’s been hand-written with auto-generated API documentation.

码云:https://gitee.com/darkone/springboot2-swagger2markup

======================代码===================

1、pom.xml依赖

2、配置文件

3、swagger核心配置类

4、entity类

5、返回结果类

6、controller类

7、swagger2Markup生成文档类

8、启动类

9、junit测试类

===================演示效果=================

1、启动项目:运行SwaggerApplication即可(参考第8步)

2、访问swagger2-ui:http://localhost:8001/springboot2-swagger/swagger-ui.html#/,如下图:

================基于main方法运行(方法一)===================

1、运行main方法,如下图:

生成如下图所示文档文件:

2、eclipse中maven执行命令:asciidoctor:process-asciidoc或mvn asciidoctor:process-asciidoc

=====================基于junit运行(方法二)======================

1、eclipse中maven执行命令:test asciidoctor:process-asciidoc或mvn asciidoctor:process-asciidoc

=============================结果(演示)=======================

1、生成html文档

2、html文档如下图:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值