I have a controller with a MultipartConfig annotation (a snippet of which is show below):
@RestController
@RequestMapping(\"packages\")
@MultipartCo
If you just want to control the multipart properties, you can use multipart.max-file-size and multipart.max-request-size properties. For example, you could raise the max size to 100Mb by adding following piece of configurations in your application.properties file:
multipart.max-file-size=100MB
multipart.max-request-size=100MB
Values can use the suffixed MB or KB to indicate a Megabyte or Kilobyte size.
Under the hood, Spring Boot will create a MultipartConfigElement based on MultipartProperties and that MultipartConfigElement will be used in Servlet registration, as stated in Spring MVC documentation. You can take a look at MultipartAutoConfiguration and DispatcherServletConfiguration and Checkout Spring Boot documentation for more information.