1.在请求头中传参数
@ApiImplicitParam(value = "token", name = "token",dataType = "String",paramType="header")
2.请求体中传递的参数是Java对象
@ApiImplicitParam(name = "Car", value = "新增车辆",paramType = "body", required = true, dataTypeClass = Car.class)
3.请求体中传递的参数是字符串
@ApiImplicitParam(value = "车牌号", name = "carno",dataType = "String",paramType="query")
4.传递多个参数
@ApiImplicitParams(value = {@ApiImplicitParam(value = "第几页", name = "pageNo",dataType = "String",paramType="query"),
@ApiImplicitParam(value = "token", name = "token",dataType = "String",paramType="header")})
转载请注明原文地址:https://ipadbbs.8miu.com/read-23769.html