List of usage examples for org.springframework.oxm.jaxb Jaxb2Marshaller setContextPaths
public void setContextPaths(String... contextPaths)
From source file:org.bremersee.common.spring.autoconfigure.JaxbAutoConfiguration.java
public static Jaxb2Marshaller createJaxbMarshaller(final Collection<String> packages) { final Set<String> packageSet = createPackageSet(packages); Jaxb2Marshaller m = new Jaxb2Marshaller(); Map<String, Object> marshallerProperties = new HashMap<>(); marshallerProperties.put(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); m.setMarshallerProperties(marshallerProperties); m.setContextPaths(packageSet.toArray(new String[packageSet.size()])); return m;//from w w w . j ava 2s .c o m }
From source file:org.osgp.adapter.protocol.dlms.application.config.JasperWirelessConfig.java
@Bean public Jaxb2Marshaller marshaller() { final Jaxb2Marshaller marshaller = new Jaxb2Marshaller(); marshaller.setContextPaths("com.jasperwireless.api.ws.service"); return marshaller; }