-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Closed as not planned
Labels
for: stackoverflowA question that's better suited to stackoverflow.comA question that's better suited to stackoverflow.comstatus: invalidAn issue that we don't feel is validAn issue that we don't feel is valid
Description
I use pretty straightforward configuration of my WebClient
:
@Configuration
class Config {
@Value("${client.baseUrl}")
private String baseUrl;
@Bean
public WebClient webClient() {
return WebClient.builder()
.codecs(this::configureCodec)
.baseUrl(baseUrl)
.defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.build();
}
private void configureCodec(ClientCodecConfigurer configurer) {
configurer
.defaultCodecs()
.maxInMemorySize(16 * 1024 * 1024);
}
}
And it works for spring-boot-starter-parent:2.6.7. However as of spring-boot-starter-parent:2.7.8 for huge payloads I get DataBufferLimitException: Exceeded limit on max bytes to buffer : 262144
which is in turn fixed by adding this line to application.properties:
spring.codec.max-in-memory-size=16777216
Neither ClientCodecConfigurer
, nor WebClient.Builder.codecs()
are deprecated and their JavaDoc as of 2.7.8 says nothing about spring.codec.max-in-memory-size
so this seems to be a bug.
However, if it's not an issue then please provide your answer to https://stackoverflow.com/questions/75445977/is-webclient-builder-codecs-ignored-in-spring-boot-2-7
Metadata
Metadata
Assignees
Labels
for: stackoverflowA question that's better suited to stackoverflow.comA question that's better suited to stackoverflow.comstatus: invalidAn issue that we don't feel is validAn issue that we don't feel is valid