当前位置:网站首页>若依框架之swagger接口文档
若依框架之swagger接口文档
2022-07-21 02:36:00 【会敲代码的小白鼠】
一:
@Api:放在请求的类上,与 @Controller 并列,说明类的作用,如学生类
tags=“说明该类的作用”
例如:展示效果:
二:用在方法上
@ApiOperation:“用在请求的方法上,说明方法的作用”
value=“说明方法的作用”
notes=“方法的备注说明”
————————————————
@ApiImplicitParams:用在请求的方法上,包含一组参数说明
@ApiImplicitParam:对单个参数的说明
name:参数名
value:参数的汉字说明、解释
required:参数是否必须传
paramType:参数放在哪个地方
· header --> 请求参数的获取:@RequestHeader
· query --> 请求参数的获取:@RequestParam
· path(用于restful接口)–> 请求参数的获取:@PathVariable
· body(请求体)–> @RequestBody User user
· form(普通表单提交)
dataType:参数类型,默认String,其它值dataType=“int”
defaultValue:参数的默认值
————————————————
@ApiResponses:方法返回对象的说明
@ApiResponse:每个参数的说明
code:数字,例如400
message:信息,例如"请求参数没填好"
response:抛出异常的类
例如:
效果: 04. FortiClient 部署 * FortiClient EMS * Fortinet 网络安全专家 NSE 5
- The longest valid bracket of question 32 in C language. Implement with stack
- Midas Capital向Moonbeam带来Fuse Pools
- [04] through the power consumption wall, what aspects should we improve "performance"?
猜你喜欢
机器学习-单变量线性回归
Pagination universelle (encapsulation du Code de pagination)
Exchange class sorting
kubernetes的这几种存储卷,别再傻傻分不清了
STM32 DHT11温湿度传感器模块学习总结
Okaleido tiger NFT is about to log in to binance NFT platform, and the era of NFT rights and interests is about to start
有趣的 Kotlin 0x0D:IntArray vs Array<Int>
Test the mock data method of knowing and knowing
Part I - Fundamentals of C language_ 9. Composite type (custom type)
ACM training July 4
随机推荐
风控数据(模型)不扎心,只因好这道流水工序上的处理技巧
HCIP第四天
Natural fit between NFT and luxury culture: NFT meets the human nature of seeking uniqueness and status
C语言类型转换
DP --- knapsack problem
用VIM正则表达式进行批量替换的小练习
ESB结合UMC云平台开发说明
Machine learning univariate linear regression
Digital twin technology creates a visualization solution for smart mines
Part I - Fundamentals of C language_ 8. Memory management
w10系统,怎样调整应用的分辨率
C语言运算符
Security video monitoring platform easycvr database fields cannot be updated, how to optimize?
有趣的 Kotlin 0x0D:IntArray vs Array<Int>
ESB combined with UMC cloud platform development instructions
Midas capital brings fuse pools to moonbeam
excel转json (树状结构)
C语言常量与变量
rk3128扬声器spk 和耳机hp声音大小调试
C language practice topic + answer: 26-30