Set Jackson FAIL_ON_UNKNOWN_PROPERTIES property to false by default

Issue: SPR-11891
This commit is contained in:
Sebastien Deleuze
2014-09-30 04:53:02 +02:00
parent 4e24d66ff7
commit 42aef5f5dc
9 changed files with 18 additions and 13 deletions

View File

@@ -384,6 +384,9 @@ public class Jackson2ObjectMapperBuilder {
this.objectMapper.registerModule(module);
}
if(!features.containsKey(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)) {
configureFeature(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
}
for (Object feature : this.features.keySet()) {
configureFeature(feature, this.features.get(feature));
}

View File

@@ -413,6 +413,9 @@ public class Jackson2ObjectMapperFactoryBean implements FactoryBean<ObjectMapper
this.objectMapper.registerModule(module);
}
if(!features.containsKey(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)) {
configureFeature(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
}
for (Object feature : this.features.keySet()) {
configureFeature(feature, this.features.get(feature));
}