Spring Boot升级到2.2.5,导致不存在所需的请求部分'file'

问题描述 投票:0回答:1

因此我们将Spring Boot从2.0.3升级到2.2.5,这导致文件导入开始失败。所以我的代码是这样的:

public Result<FileResponse> importFile(@RequestParam(value = "file") MultipartFile file) {...}

我们有几个自定义过滤器,我们在嵌入式Tomcat 9.0.3上运行。我们得到一个类似于...required request part 'file' is not present...的带有堆栈跟踪的响应。似乎文件未正确填充。

spring-boot servlet-filters
1个回答
0
投票

所以发生了什么事:

© www.soinside.com 2019 - 2024. All rights reserved.