在controller中使用swagger,使用注解ApiImplicitParam遇到一个问题

 

当方法的参数是走path的swggerui的参数展现是正常的,

@PathVariable

 

 

但如果是走query的时候,swggerui的参数展现是不正常的。

@RequestParam

 

原因是, 注解ApiImpliciParam的属性paramType的属性默认是path , 如果是@RequestParam, 需要显示写paramType="query"

如下

        @ApiImplicitParam(name="a", paramType = "query",value = "一个数字a"),

  

 

相关文章:

  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2021-11-26
  • 2022-12-23
  • 2021-10-22
  • 2021-08-03
  • 2021-12-08
猜你喜欢
  • 2022-01-12
  • 2018-02-01
  • 2021-11-30
  • 2022-12-23
  • 2021-12-02
  • 2021-12-25
  • 2022-12-23
相关资源
相似解决方案