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