SpringBoot's @MultipartConfig maxFileSize not taking effect

后端 未结 7 1614
野性不改
野性不改 2021-02-02 07:52

I have a controller with a MultipartConfig annotation (a snippet of which is show below):

@RestController
@RequestMapping(\"packages\")
@MultipartCo         


        
7条回答
  •  甜味超标
    2021-02-02 08:26

    With spring-boot 1.5.3 you should use the following code in application.yml

    spring:
     http:
      multipart:
       max-file-size: 100MB
       max-request-size: 100MB
    

    Make sure to use spaces and not tab in your yaml file.

提交回复
热议问题