swagger
susie_小石头
这个作者很懒,什么都没留下…
展开
-
swagger2测试单个文件或者多文件上传(springboot)
单个文件@ApiOperation(value = "上传视频接口",notes = "上传视频接口")@ApiImplicitParams({ @ApiImplicitParam(name = "uId",value = "上传用户ID,",paramType = "query",required = true,dataType = "int")})@PostMapping(value = "/video/uplode", headers = "content-type=m原创 2021-12-17 10:22:26 · 5227 阅读 · 0 评论 -
swagger 返回参数注解
第一种@ApiOperation(value = "取消/流失列表")@GetMapping("/getStudentLoseList")@ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "type", value = "类型(0:取消分班 1:流失)",required = true,dataType = "int"), @ApiImplicitParam(paramType = "query".原创 2021-12-17 10:16:37 · 8530 阅读 · 0 评论 -
Swagger 参数为int数组
@ApiOperation(value = "状态", notes = "通过数组形式传入消息id")@RequestMapping(value = "/", method = RequestMethod.PUT)public ReturnInfo modifyMessageByMsgId(@ApiParam("用户ID数组") @RequestParam Integer[] ids) { for (int s : ids) { System.out.println(s); .原创 2021-12-17 09:32:35 · 717 阅读 · 0 评论 -
配置Swagger带token访问
第一种:设置全局token@Beanpublic Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) .select() //加了ApiOperation注解的类,才生成接口文档 .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperat原创 2021-12-17 09:21:12 · 5184 阅读 · 0 评论