swagger依赖的选用

总结

如果你的项目使用jax-rs来实现RESTful接口,你就用io.swagger来集成swagger;如果你的项目使用springmvc来实现RESTful接口,最新的方法还是推荐使用springfox,但是也存在还在继续使用mangofactory来实现与swagger集成的项目。

下面的链接给出了不同方式的大体实现方式,大家可以参考一下,并相应的去github上找一些demo来了解具体实现。
https://stackoverflow.com/questions/26720090/a-simple-way-to-implement-swagger-in-a-spring-mvc-application

参考:

https://blog.csdn.net/u010924834/article/details/77427530?foxhandler=rssreadrenderprocesshandler


Here is an explanation of the different libraries.

Springfox is in a sense v2 of the swagger library that used to be packaged as mangofactory. What happened was we transitioned from using a private repo to creating a github organization so support development as a team.

In short mangofactory evolved into springfox which supports 2.0 version of swagger spec (in addition to 1.2). To be clear springfox and its predecessor supports spring mvc.

io.swagger is the mother ship if you will. It has great support for spring and jax-rs. So if you’re looking for support for Jax-rs based services using spring or otherwise that’s a great option.

io.swagger is the package for swagger libraries and you need separate spring jars to couple it with Spring. This is version 2 of swagger.

io.springfox is Springfox Swagger2, wherein swagger comes integrated with Spring.

com.mangofactory is swagger integrated with Spring Web MVC framework.

To understand differences between Spring Web MVC framework and spring, you can read this: what is the difference between Spring and Spring MVC framework


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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值