问题描述
上传大文件报错:
Caused by: java.lang.OutOfMemoryError
at java.io.ByteArrayOutputStream.hugeCapacity(ByteArrayOutputStream.java:123) ~[?:1.8.0_381]
at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:117) ~[?:1.8.0_381]
at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93) ~[?:1.8.0_381]
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153) ~[?:1.8.0_381]
at org.springframework.util.StreamUtils.copy(StreamUtils.java:167) ~[spring-core-5.3.29.jar:5.3.29]
at org.springframework.util.FileCopyUtils.copy(FileCopyUtils.java:112) ~[spring-core-5.3.29.jar:5.3.29]
at org.springframework.util.FileCopyUtils.copyToByteArray(FileCopyUtils.java:152) ~[spring-core-5.3.29.jar:5.3.29]
at org.sp