diff --git a/pom.xml b/pom.xml index c80d6e890..b17a402cd 100644 --- a/pom.xml +++ b/pom.xml @@ -82,7 +82,7 @@ 18.0 1.3 4.12.1 - 2.5.4 + 2.8.9 1.2 4.12 1.10.19 @@ -196,12 +196,6 @@ ${jackson.version} - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - ${jackson.version} - - com.fasterxml.jackson.datatype jackson-datatype-guava diff --git a/src/main/java/gov/nysenate/ess/core/config/JacksonConfig.java b/src/main/java/gov/nysenate/ess/core/config/JacksonConfig.java index c6402bb72..700d0fbd1 100644 --- a/src/main/java/gov/nysenate/ess/core/config/JacksonConfig.java +++ b/src/main/java/gov/nysenate/ess/core/config/JacksonConfig.java @@ -3,9 +3,9 @@ import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.dataformat.xml.JacksonXmlModule; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.datatype.guava.GuavaModule; -import com.fasterxml.jackson.datatype.jsr310.JSR310Module; import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -28,7 +28,9 @@ public ObjectMapper jsonObjectMapper() { */ @Bean public ObjectMapper xmlObjectMapper() { - ObjectMapper objectMapper = new XmlMapper(); + JacksonXmlModule module = new JacksonXmlModule(); + module.setDefaultUseWrapper(false); + ObjectMapper objectMapper = new XmlMapper(module); configureMapper(objectMapper); return objectMapper; } @@ -42,7 +44,6 @@ private void configureMapper(ObjectMapper objectMapper) { objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); objectMapper.registerModule(new GuavaModule()); - objectMapper.registerModule(new JSR310Module()); objectMapper.registerModule(new JaxbAnnotationModule()); } }