Spring Swagger UI: what is difference between io.swagger, io.springfox, and com.mangofactory

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

总结

  如果你的项目使用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

你可能感兴趣的:(swagger)