springboot 文件上传限制(yml配置)

一、文件上传大小配置

-------springboot 2.0以后----------

spirng:  
 servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB

-------springboot 2.0以前----------
spring:
 http:
  multipart:
   max-file-size: 100MB
  max-request-size: 100MB

二、上下文配置

-------springboot 2.0以后----------

server:
port: 9005
servlet:
context-path: /risk-warn
-------springboot 2.0以前----------
server:
port: 9005
context-path: /risk-warn


 
原文地址:https://www.cnblogs.com/sanshao-ghf/p/14929603.html