mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-23 14:40:00 +00:00
Refine Kotlin serialization converters/codecs conditions
This commit is a follow-up of 34410 to refine the activation conditions of Kotlin serialization converters/codecs. Closes gh-34438
This commit is contained in:
@@ -108,14 +108,16 @@ class RestTemplateTests {
|
||||
template.setErrorHandler(errorHandler);
|
||||
}
|
||||
|
||||
@Test // gh-29008
|
||||
void defaultMessageConvertersWithKotlinSerialization() {
|
||||
@Test
|
||||
void defaultMessageConvertersWithoutKotlinSerialization() {
|
||||
RestTemplate restTemplate = new RestTemplate();
|
||||
List<HttpMessageConverter<?>> httpMessageConverters = restTemplate.getMessageConverters();
|
||||
assertThat(httpMessageConverters).extracting("class").containsOnlyOnce(
|
||||
KotlinSerializationJsonHttpMessageConverter.class,
|
||||
MappingJackson2HttpMessageConverter.class
|
||||
);
|
||||
assertThat(httpMessageConverters).extracting("class").doesNotContain(
|
||||
KotlinSerializationJsonHttpMessageConverter.class
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user