Missing registration of JaxbAnnotationModule for Jackson added

git-svn-id: https://svn.libreccm.org/ccm/trunk@5090 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2017-10-27 17:20:06 +00:00
parent a19c9787fb
commit 2055a9f21a
1 changed files with 3 additions and 0 deletions

View File

@ -21,7 +21,9 @@ package com.arsdigita.portation;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.dataformat.xml.JacksonXmlModule; import com.fasterxml.jackson.dataformat.xml.JacksonXmlModule;
import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule;
import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlMapper;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import java.io.File; import java.io.File;
@ -60,6 +62,7 @@ public abstract class AbstractMarshaller<P extends Portable> {
JacksonXmlModule module = new JacksonXmlModule(); JacksonXmlModule module = new JacksonXmlModule();
module.setDefaultUseWrapper(false); module.setDefaultUseWrapper(false);
xmlMapper = new XmlMapper(module); xmlMapper = new XmlMapper(module);
xmlMapper.registerModule(new JaxbAnnotationModule());
if (indentation) { if (indentation) {
xmlMapper.enable(SerializationFeature.INDENT_OUTPUT); xmlMapper.enable(SerializationFeature.INDENT_OUTPUT);
} }