Merge branch '5.2.x'

# Conflicts:
#	spring-web/src/test/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilderTests.java
#	spring-web/src/test/java/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBeanTests.java
This commit is contained in:
Juergen Hoeller
2020-10-13 11:35:36 +02:00
2 changed files with 4 additions and 2 deletions

View File

@@ -712,10 +712,12 @@ class Jackson2ObjectMapperBuilderTests {
}
}
@SuppressWarnings("serial")
public static class MyXmlFactory extends XmlFactory {
}
static class Foo {}
static class Bar {}

View File

@@ -212,7 +212,7 @@ public class Jackson2ObjectMapperFactoryBeanTests {
assertThat(new String(objectMapper.writeValueAsBytes(dateTime), "UTF-8")).isEqualTo(timestamp.toString());
}
@Test // SPR-12634
@Test // SPR-12634
public void customizeDefaultModulesWithModuleClass() throws JsonProcessingException, UnsupportedEncodingException {
this.factory.setModulesToInstall(CustomIntegerModule.class);
this.factory.afterPropertiesSet();
@@ -223,7 +223,7 @@ public class Jackson2ObjectMapperFactoryBeanTests {
assertThat(new String(objectMapper.writeValueAsBytes(4), "UTF-8")).contains("customid");
}
@Test // SPR-12634
@Test // SPR-12634
public void customizeDefaultModulesWithSerializer() throws JsonProcessingException, UnsupportedEncodingException {
Map<Class<?>, JsonSerializer<?>> serializers = new HashMap<>();
serializers.put(Integer.class, new CustomIntegerSerializer());