Error:
2020-01-05 10:42:06.524 WARN 17840 --- [io-8080-exec-10] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size exceeded; nested exception is java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$FileSizeLimitExceededException: The field editormd-image-file exceeds its maximum permitted size of 1048576 bytes.]
这个意思就是上传的文件超出了其最大允许大小1048576字节
解决方法:
在application.properties中配置如下:
#单个文件最大大小
spring.servlet.multipart.max-file-size=10MB
#所有上传文件最大大小
spring.servlet.multipart.max-request-size=100MB