首页测试

swagger ui swagger2 文件上传参数 input file

版本(理论上来讲应该所有版本都可以,如果不行,大家就换成2.1.2)

<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-swagger2</artifactId>
    <version>${swagger2-version}</version>
</dependency>

<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-swagger-ui</artifactId>
    <version>2.1.2</version>
</dependency>
<swagger2-version>2.1.2</swagger2-version>

如图:

注意:paramType只能是form,不要写显示出来的formData

 

网上很多教程都是用@ApiParam和@RequestParam,不适用于我(上传接口需要支持多文件多input(name值不一样)),推荐大家用这种。

 

 

posted @ 2022-07-10 10:06  zl20110000  阅读(348)  评论(0)    收藏  举报
页脚测试
zl test:::