use of org.zalando.problem.ProblemModule in project nakadi by zalando.
the class JsonConfig method jacksonObjectMapper.
@Bean
@Primary
public ObjectMapper jacksonObjectMapper() {
final ObjectMapper objectMapper = new ObjectMapper().setPropertyNamingStrategy(CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES);
objectMapper.registerModule(enumModule());
objectMapper.registerModule(new Jdk8Module());
objectMapper.registerModule(new ProblemModule());
objectMapper.registerModule(new JodaModule());
objectMapper.configure(WRITE_DATES_AS_TIMESTAMPS, false);
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
return objectMapper;
}
Aggregations