当前位置:网站首页>Swagger simple quick start tutorial
Swagger simple quick start tutorial
2022-07-25 04:18:00 【51CTO】
One 、 Use springfox Generate interface UI
1、 Import springfox-boot-starter rely on
2、 To configure config
3、swagger Of Api Introduce
| full name | describe |
|---|---|
| @Api | Mark the class as Swagger resources ( Generally used to describe Controller) |
| @ApiImplicitParam | Express API Single parameter in operation ( Generally used to describe specific method parameters ) |
| @ApiImplicitParams | Allow multiple ApiImplicitParam Wrapper for object list ( It's usually used for packages @ApiImplicitParam) |
| @ApiModel | Provide relevant Swagger Other information about the model ( Generally used to describe Controller Of method parameters pojo class ) |
| @ApiModelProperty | Add and manipulate data for model properties ( Generally used to describe pojo Properties of ) |
| @ApiOperation | Describe the operation for a specific path or usually HTTP Method .( Generally used to describe Controller Method ) |
| @ApiParam | Add additional metadata for operation parameters . |
| @ApiResponse | Describe the possible response of the operation . |
| @ApiResponses | Allow multiple ApiResponse Wrapper for object list . |
| @Authorization | Declare the authorization scheme to be used on the resource or operation . |
| @AuthorizationScope | describe OAuth2 Scope of Authorization . |
@Api Usage is as follows :
@ApiOperationUsage is as follows :
@ApiImplicitParams、@ApiImplicitParamUsage is as follows :
@ApiModel、@ApiModelPropertyUsage is as follows :
visit swagger-ui/index.html Interface :

Two 、 Use knife4j Generate interface UI
1、 Import knife4j-spring-boot-starter rely on
2、 To configure config
visit doc.html page :

边栏推荐
- Es- retrieve the selected field from the search
- Nested if selection structure and switch selection structure
- Wechat applet application development (I)
- Implementing DDD based on ABP -- domain logic and application logic
- The application could not be installed: INSTALL_ FAILED_ USER_ RESTRICTED
- Preparation for Android development in big companies
- Interview question 05.06. integer conversion
- Creativity: presentation of AI oil paintings with high imitation mineral pigments
- MySQL eight shares
- Which stock exchange has the lowest commission? Is online account manager safe to open an account
猜你喜欢

DNS domain name resolution

Construction of data center (I): background of the emergence of data center

DNS domain name resolution service

Analyze the exploration in high-quality steam Education

EMQ Yingyun technology was successfully selected into the 2022 "cutting edge 100" list of Chinese entrepreneurs

Emergency response stack

Day008 select structure (switch statement)

Sales system of infant products based on SSH

数据中台建设(一):数据中台出现的背景

Current characteristics of steering gear with great resistance
随机推荐
Simple understanding of RPC
Which securities company is better to open an account? Is it safe to open an account on your mobile phone
Wechat applet application development (I)
Installation and tutorial of MATLAB curling simulation game
Custom dialog (including header and footer)
Spire. Office for net 7.7.2 and news
Has baozi ever played in the multi merchant system?
Bubble mart's market value evaporated by HK $21billion in seven days, which can't be sold in China, and its future at sea is uncertain
CVPR 2022 | content aware text logo image generation method
LVGL 8.2 Tabview
LVGL 8.2 Span
Wechat applet access wechat payment process
LVGL 8.2 Spinbox
Numpy overview
What tools are available to connect and manage polardb for PostgreSQL databases?
Maker concept design to adapt to popular education
Chapter 18 request matcher serverwebexchangematcher of oauth2loginauthenticationwebfilter
ADS1256 debugging notes based on stm32hal Library
Penetration test target combat SQL injection getshell
Creativity: presentation of AI oil paintings with high imitation mineral pigments