i am using Jackson and was wondering if it is possible to set global properties using resources.xml?
Example:
In some places i need to do:
jsonMapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
It would be nice that i can configure Jackson to do this global using spring resources.xml,
any suggestion on how to do this?
You can do this easily, just extend the
org.codehaus.jackson.map.ObjectMapperclass and specify all your properties in the constructor(or you can accept a map as well): Then autowire your own ObjectMapper where you need it.