double quoted xml declaration added

This commit is contained in:
Ivan Nikolaev-Axenov 2024-11-21 18:07:23 +03:00
parent aebfc35eb4
commit a0f4a5d8f2

View file

@ -1,5 +1,6 @@
package ru.spcex.clearing.xml.exporter.config;
import com.ctc.wstx.api.WstxOutputProperties;
import com.ctc.wstx.stax.WstxInputFactory;
import com.ctc.wstx.stax.WstxOutputFactory;
import com.fasterxml.jackson.databind.SerializationFeature;
@ -57,6 +58,7 @@ public class XMLExporterConfig {
xmlMapper.registerModule(new JavaTimeModule());
xmlMapper.configure(ToXmlGenerator.Feature.WRITE_XML_DECLARATION, true);
xmlMapper.configure(SerializationFeature.INDENT_OUTPUT, true);
xmlMapper.getFactory().getXMLOutputFactory().setProperty(WstxOutputProperties.P_USE_DOUBLE_QUOTES_IN_XML_DECL, true);
return xmlMapper;
}