Skip to content

Commit 8f4ea68

Browse files
committed
Merge branch '2.7.x' into 3.0.x
Closes gh-38150
2 parents cb18d87 + 020c2b3 commit 8f4ea68

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveMultipartAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ CodecCustomizer defaultPartHttpMessageReaderCustomizer(ReactiveMultipartProperti
6262
.asInt(DataSize::toBytes)
6363
.to(defaultPartHttpMessageReader::setMaxHeadersSize);
6464
map.from(multipartProperties::getMaxDiskUsagePerPart)
65-
.asInt(DataSize::toBytes)
65+
.as(DataSize::toBytes)
6666
.to(defaultPartHttpMessageReader::setMaxDiskUsagePerPart);
6767
map.from(multipartProperties::getMaxParts).to(defaultPartHttpMessageReader::setMaxParts);
6868
map.from(multipartProperties::getFileStorageDirectory)

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveMultipartAutoConfigurationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void shouldConfigureMultipartPropertiesForDefaultReader() {
6262
this.contextRunner
6363
.withPropertyValues("spring.webflux.multipart.max-in-memory-size=1GB",
6464
"spring.webflux.multipart.max-headers-size=16KB",
65-
"spring.webflux.multipart.max-disk-usage-per-part=100MB", "spring.webflux.multipart.max-parts=7",
65+
"spring.webflux.multipart.max-disk-usage-per-part=3GB", "spring.webflux.multipart.max-parts=7",
6666
"spring.webflux.multipart.headers-charset:UTF_16")
6767
.run((context) -> {
6868
CodecCustomizer customizer = context.getBean(CodecCustomizer.class);
@@ -76,7 +76,7 @@ void shouldConfigureMultipartPropertiesForDefaultReader() {
7676
assertThat(partReader).hasFieldOrPropertyWithValue("maxInMemorySize",
7777
Math.toIntExact(DataSize.ofGigabytes(1).toBytes()));
7878
assertThat(partReader).hasFieldOrPropertyWithValue("maxDiskUsagePerPart",
79-
DataSize.ofMegabytes(100).toBytes());
79+
DataSize.ofGigabytes(3).toBytes());
8080
});
8181
}
8282

0 commit comments

Comments
 (0)