SpringBoot修改上传文件(图片等)的默认大小(1048576 bytes)的解决方案!
对于异常:FileSizeLimitExceededException: The field img exceeds its maximum permitted size of 1048576 bytes.FileSizeLimitExceedeException:字段img超出其最大允许大小1048576字节。在根目录的主配置文件application.properties当中加入以下代码即可:spring.servlet.multipart.max-file-size =4MBspring.servlet.multipart.max-request-size = 32MB