whole picture, I put all the dependence on this, because it is a super simple project, so this relies on very little, convenient audience, look at clearly, each dependence is what.
I see some old iron article inside, swear to say, old simple, need to specially introduce springfox-swagger2 and springfox-swagger-ui 2 jar Dependence, is the front of the two
what is Swagger.
Swagger is a normative and complete framework for generating, describing, invoking, and visualizing RESTful Web services.
Springfox, formerly known as SWAGGER-SPRINGMVC, is an open source API Doc framework that can be used to document the methods of our Controller, based on
Error generating Swagger server (Python Flask) from Swagger editor, swaggerflask
1 down votefavorite
Http://stackoverflow.com/questions/36416679/error-generating-swagger-server-python-flask-from-swagger-editorI 've used the Swagger Editor to manually generate my
1. Search Spring ShowcaseYou can find this article http://spring.io/blog/2010/07/22/spring-mvc-3-showcaseis to teach you how to use spring MVC2. Go to GitHub to download the source code3. The next task is to integrate the swagger in--------------------------------------------------------------------------1. Enter HTTPS://GITHUB.COM/SPRINGFOX/SPRINGFOX/BLOB/V1.0.2
Because the company uses the spring version is too high, in the integration of swagger, there will be some problems, and many of the online instances are mostly version of the lower, in order to be friends less than the pit, my side will integrate the process to record:
Introduce spring, swagger related jar packages (Springfox-swagger2,
1 Swagger 1.1 DescriptionThe front-end separation of the project needs the front-end developers to work together, the background developers need to give the front-end developer a set of API documentation, using swagger can easily and efficiently help background developers to generate RESTFULAPI development documentsWebsite address: Click to go1.2 Using step 1.2.1 to introduce
How to get Started1. I search for SWAGGER-SPRINGMVC on http://mvnrepository.com/2. I found a specific version of http://mvnrepository.com/artifact/com.mangofactory/swagger-springmvc/1.0.23. I found the official website.4. Point-in link I found the source and the official websitehttp://springfox.github.io/springfox/Found Sprin
Because the company uses the spring version is too high, in the integration of swagger, there will be some problems, and many of the online instances are mostly version of the lower, in order to be friends less than the pit, my side will integrate the process to record:1. Introduce the spring, swagger related jar packages (Springfox-swagger2,
Because the company uses the spring version is too high, in the integration of swagger, there will be some problems, and many of the online instances are mostly version of the lower, in order to be friends less than the pit, my side will integrate the process to record:1. Introduce the spring, swagger related jar packages (Springfox-swagger2,
1 Working principleThere are more and more projects that are separated by the spring boot development front and back end, and the front and back ends are often the responsibility of different developers or teams. If the backend developed some rest interfaces, how can these interfaces be quickly and accurately described to front-end developers?Swagger provides a technical implementation of automatic scan generation API interface documentation2 Integrat
The swagger can better document the Restfull API in the background, as shown in:1. Swagger mainly relies on the following two jar packages: //mvnrepository.com/artifact/io.springfox/springfox-swagger2- // Mvnrepository.com/artifact/io.springfox/springfox-swagger
Note: This document is referenced fromHttp://www.jianshu.com/p/0465a2b837d2Swagger is used to define API documentation.Benefits:
Front-end separation development
API documentation is very clear
You do not need to use the URL input browser to access the controller when testing
The traditional way to test input URLs is cumbersome for post requests (of course, you can use a browser plugin like postman)
The integration of Spring-boot and
Bo Master is very lazy ...Swagger Official website: Http://swagger.ioGitHub Address: Https://github.com/swagger-apiOfficial Note document: http://docs.swagger.io/swagger-core/apidocs/index.htmlSwagger-ui Address: Https://github.com/swagger-api/swagger-uiSwagger finalWell, st
deployment.Swagger the principle of this framework: the framework presents a document specification OAS, and provides a corresponding visual editor to edit this document and verify the document format, the format of the document is XML or JSON form of the file (hereinafter referred to as API meta-file), The API meta-File framework provides a visual representation of API meta-files, which can be used to customize the template in the form of a browser's web page (i.e. an interactive web system) a
Because the company uses the spring version is too high, in the integration of swagger, there will be some problems, and many of the online instances are mostly version of the lower, in order to be friends less than the pit, my side will integrate the process to record:
Introduce spring, swagger related jar packages (Springfox-swagger2,
Because the company uses the spring version is too high, in the integration of swagger, there will be some problems, and many of the online instances are mostly version of the lower, in order to be friends less than the pit, my side will integrate the process to record:
Introduce spring, swagger related jar packages (Springfox-swagger2,
integration: With the addition of POM dependencies and simple configuration, the API interface document interface can be published simultaneously in the application, without the need to deploy standalone services.
1. Add dependencyTo add Maven dependencies, choose the 2.8.0 version here.!--Swagger --Dependency> GroupId>Io.springfoxGroupId> Artifactid>Springfox-Swagger2Artifactid> Version>2.8.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.