Missing registration of JaxbAnnotationModule for Jackson added
git-svn-id: https://svn.libreccm.org/ccm/trunk@5090 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
a19c9787fb
commit
2055a9f21a
|
|
@ -21,7 +21,9 @@ package com.arsdigita.portation;
|
|||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
import com.fasterxml.jackson.dataformat.xml.JacksonXmlModule;
|
||||
import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule;
|
||||
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.io.File;
|
||||
|
|
@ -60,6 +62,7 @@ public abstract class AbstractMarshaller<P extends Portable> {
|
|||
JacksonXmlModule module = new JacksonXmlModule();
|
||||
module.setDefaultUseWrapper(false);
|
||||
xmlMapper = new XmlMapper(module);
|
||||
xmlMapper.registerModule(new JaxbAnnotationModule());
|
||||
if (indentation) {
|
||||
xmlMapper.enable(SerializationFeature.INDENT_OUTPUT);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue