【java】swagger传文件报Required request part ‘file‘ is not present

@PostMapping(value = "/upload-file", consumes = "multipart/*", headers = "content-type=multipart/form-data")
@ApiOperation(value = "上传文件")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "form", name = "file", value = "文件", required = true, dataType = "__file"),})
public File upload(MultipartFile file) {
}

你可能感兴趣的:(java,java,开发语言,后端)