SpringBoot's @MultipartConfig maxFileSize not taking effect

后端 未结 7 1641
野性不改
野性不改 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:39

    On deployment, where the values are inserted via jenkins script, no "-" is allowed. Use:

    env:
      - name: SPRING_SERVLET_MULTIPART_MAXREQUESTSIZE
        value: "10MB"
      - name: SPRING_SERVLE
        value: "10MB"
    

提交回复
热议问题