mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge branch '3.0.x' into 3.1.x
Closes gh-38151
This commit is contained in:
commit
1fcf1fcc20
@ -62,7 +62,7 @@ public class ReactiveMultipartAutoConfiguration {
|
||||
.asInt(DataSize::toBytes)
|
||||
.to(defaultPartHttpMessageReader::setMaxHeadersSize);
|
||||
map.from(multipartProperties::getMaxDiskUsagePerPart)
|
||||
.asInt(DataSize::toBytes)
|
||||
.as(DataSize::toBytes)
|
||||
.to(defaultPartHttpMessageReader::setMaxDiskUsagePerPart);
|
||||
map.from(multipartProperties::getMaxParts).to(defaultPartHttpMessageReader::setMaxParts);
|
||||
map.from(multipartProperties::getFileStorageDirectory)
|
||||
|
@ -62,7 +62,7 @@ class ReactiveMultipartAutoConfigurationTests {
|
||||
this.contextRunner
|
||||
.withPropertyValues("spring.webflux.multipart.max-in-memory-size=1GB",
|
||||
"spring.webflux.multipart.max-headers-size=16KB",
|
||||
"spring.webflux.multipart.max-disk-usage-per-part=100MB", "spring.webflux.multipart.max-parts=7",
|
||||
"spring.webflux.multipart.max-disk-usage-per-part=3GB", "spring.webflux.multipart.max-parts=7",
|
||||
"spring.webflux.multipart.headers-charset:UTF_16")
|
||||
.run((context) -> {
|
||||
CodecCustomizer customizer = context.getBean(CodecCustomizer.class);
|
||||
@ -76,7 +76,7 @@ class ReactiveMultipartAutoConfigurationTests {
|
||||
assertThat(partReader).hasFieldOrPropertyWithValue("maxInMemorySize",
|
||||
Math.toIntExact(DataSize.ofGigabytes(1).toBytes()));
|
||||
assertThat(partReader).hasFieldOrPropertyWithValue("maxDiskUsagePerPart",
|
||||
DataSize.ofMegabytes(100).toBytes());
|
||||
DataSize.ofGigabytes(3).toBytes());
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user