1 package de.spring.webservices.configuration;
3 import javax.inject.Inject;
5 import org.springframework.context.annotation.Configuration;
7 import com.fasterxml.jackson.databind.DeserializationFeature;
8 import com.fasterxml.jackson.databind.MapperFeature;
9 import com.fasterxml.jackson.databind.ObjectMapper;
10 import com.fasterxml.jackson.databind.SerializationFeature;
11 import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
14 public class JacksonConfiguration {
17 public void configureJackson(ObjectMapper jackson2ObjectMapper) {
19 .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
20 .disable(MapperFeature.DEFAULT_VIEW_INCLUSION)
21 .disable(SerializationFeature.FAIL_ON_EMPTY_BEANS)
22 .enable(SerializationFeature.INDENT_OUTPUT)
23 .registerModule(new JavaTimeModule());