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:
@@ -712,10 +712,12 @@ class Jackson2ObjectMapperBuilderTests {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static class MyXmlFactory extends XmlFactory {
|
||||
}
|
||||
|
||||
|
||||
static class Foo {}
|
||||
|
||||
static class Bar {}
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user