Browse Source

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
pull/25647/head
Juergen Hoeller 4 years ago
parent
commit
cd835b3124
  1. 2
      spring-web/src/test/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilderTests.java
  2. 4
      spring-web/src/test/java/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBeanTests.java

2
spring-web/src/test/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilderTests.java

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

4
spring-web/src/test/java/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBeanTests.java

@ -212,7 +212,7 @@ public class Jackson2ObjectMapperFactoryBeanTests { @@ -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 { @@ -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());

Loading…
Cancel
Save