我无法上传有关我的api的文件,因为swagger ui上没有可用的上传选项。This is how it looks like
我的招摇配置类-
@EnableSwagger2
@Configuration
public class SwaggerConfiguration {
@Bean
public Docket fileUploadApi(){
return new Docket(DocumentationType.SWAGGER_2).select()
.apis(RequestHandlerSelectors.basePackage("com.spicemoney.fileupload.controller"))
.paths(PathSelectors.any()).build().apiInfo(metaInfo());
}
}
我的API映射-
@PostMapping(value = "/uploadFile", consumes = { MediaType.MULTIPART_FORM_DATA_VALUE })
public List<String> uploadFile(@RequestPart("files") MultipartFile[] files)