the request was rejected because its size (117313185) exceeds the configured maximum (10485760)
时间: 2024-04-25 13:25:13 浏览: 34
根据你提供的引用内容,你遇到的问题是在SpringBoot项目中进行文件上传时报错,错误信息是"the request was rejected because its size (117313185) exceeds the configured maximum (10485760)"。这是因为SpringBoot默认配置的文件上传大小限制是10MB,而你上传的文件大小超过了这个限制。
为了解决这个问题,你可以在application.yml或application.properties文件中增加配置,将最大上传文件大小调整为100MB。具体的配置方式如下:
在application.yml中添加配置:
```
spring:
servlet:
multipart:
max-file-size: 100MB
max-request-size: 500MB
```
需要注意的是,配置中的文件大小单位一定要带上(KB,MB,GB等)。另外,这种配置方式适用于SpringBoot 2.0及之后的版本。如果你使用的是SpringBoot 1.4版本,配置方式如下:
```
spring:
http:
multipart:
maxFileSize: 100MB
maxRequestSize: 500MB
```
通过以上配置,你可以将最大上传文件大小调整为100MB,解决文件上传大小超过限制的问题。
#### 引用[.reference_title]
- *1* [SpringBoot项目上传大文件报错the request was rejected because its size exceeds the configured maximum...](https://blog.csdn.net/zhang_m_h/article/details/123862814)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [文件上传报错 the request was rejected because its size exceeds the configured maximum (10485760)](https://blog.csdn.net/clearlxj/article/details/123084973)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [Spring上传文件报错the request was rejected because its size (15920203) exceeds the configured ...](https://blog.csdn.net/lingyejun/article/details/127439397)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)