κ²μνμ μ΄λ―Έμ§ μ λ‘λ κΈ°λ₯μ λ§λ€λ μ€ κ³ νμ§μ μ΄λ―Έμ§λ₯Ό μ λ‘λ νλ©΄ μ€λ₯κ° μκΈ°λ λ¬Έμ λ₯Ό λ°κ²¬νλ€. μ΄μ λ₯Ό μ°Ύμ보λ νμΌ μ λ‘λ μ©λμ λ°λ‘ μ€μ νμ§ μμμ λ°μν μλ¬μλ€.
nested exception is org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size exceeded;
nested exception is java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.impl.FileSizeLimitExceededException: The field image exceeds its maximum permitted size of 1048576 bytes.
org.apache.tomcat.util.http.fileupload.impl.FileSizeLimitExceededException
error λ‘κ·Έλ₯Ό μ½μ΄λ³΄λ©΄ μ λ‘λν μ μλ μ΅λ μ©λμ λκΈ΄ νμΌμ μ λ‘λ ν λ λ°μνλ μλ¬λ€.
default κ°μ΄ 1048576bytesλ‘ μ½ 1MBμ΄λ€.
Spring Boot 2.X
spring.servlet.multipart.maxFileSize=50MB // μ©λ
spring.servlet.multipart.maxRequestSize=50MB // μ©λ
Spring Boot 1.4.x & 1.5.x
spring.http.multipart.maxFileSize=50MB
spring.http.multipart.maxRequestSize=50MB
Spring Boot 1.3.x or κ·Έ μ΄μ λ²μ
multipart.maxFileSize=50MB
multipart.maxRequestSize=50MB