sprintBoot上传图片报错:Maximum upload size exceeded; nested exception is java.lang.IllegalStateException:

时间:2024-03-29 07:38:19

报错信息:

org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size exceeded; nested exception is java.lang.IllegalStateException: io.undertow.server.handlers.form.MultiPartParserDefinition$FileTooLargeException: UT000054: The maximum size 1048576 for an individual file in a multipart request was exceeded

1. Maximum upload size exceeded:这句话的意思是,“超过出了上传大小”

也就是说,图片不能过大,因此更改配置文件,添加的如图所示(这是其中之一)
sprintBoot上传图片报错:Maximum upload size exceeded; nested exception is java.lang.IllegalStateException:

1. 接下来想要改Nginx的conf文件

sprintBoot上传图片报错:Maximum upload size exceeded; nested exception is java.lang.IllegalStateException:
使用记事本或其他工具打开
sprintBoot上传图片报错:Maximum upload size exceeded; nested exception is java.lang.IllegalStateException:

然后Nginx重新开启一次,项目重启就可以重新上传图片了