use of org.springframework.http.codec.support.DefaultClientCodecConfigurer in project spring-boot by spring-projects.
the class CodecsAutoConfigurationTests method loggingRequestDetailsCustomizerShouldUseHttpProperties.
@Test
void loggingRequestDetailsCustomizerShouldUseHttpProperties() {
this.contextRunner.withPropertyValues("spring.codec.log-request-details=true").run((context) -> {
CodecCustomizer customizer = context.getBean(CodecCustomizer.class);
CodecConfigurer configurer = new DefaultClientCodecConfigurer();
customizer.customize(configurer);
assertThat(configurer.defaultCodecs()).hasFieldOrPropertyWithValue("enableLoggingRequestDetails", true);
});
}
use of org.springframework.http.codec.support.DefaultClientCodecConfigurer in project spring-boot by spring-projects.
the class CodecsAutoConfigurationTests method maxInMemorySizeEnforcedInDefaultCodecs.
@Test
void maxInMemorySizeEnforcedInDefaultCodecs() {
this.contextRunner.withPropertyValues("spring.codec.max-in-memory-size=1MB").run((context) -> {
CodecCustomizer customizer = context.getBean(CodecCustomizer.class);
CodecConfigurer configurer = new DefaultClientCodecConfigurer();
customizer.customize(configurer);
assertThat(configurer.defaultCodecs()).hasFieldOrPropertyWithValue("maxInMemorySize", 1048576);
});
}
use of org.springframework.http.codec.support.DefaultClientCodecConfigurer in project spring-boot by spring-projects.
the class CodecsAutoConfigurationTests method autoConfigShouldProvideALoggingRequestDetailsCustomizer.
@Test
void autoConfigShouldProvideALoggingRequestDetailsCustomizer() {
this.contextRunner.run((context) -> {
CodecCustomizer customizer = context.getBean(CodecCustomizer.class);
CodecConfigurer configurer = new DefaultClientCodecConfigurer();
customizer.customize(configurer);
assertThat(configurer.defaultCodecs()).hasFieldOrPropertyWithValue("enableLoggingRequestDetails", false);
});
}
Aggregations