// spring-boot-auto-configure options: START
:page-partial:
:doctitle: Camel Spring Boot Starter for jaxb

== Spring Boot Auto-Configuration

When using jaxb with Spring Boot make sure to use the following Maven dependency to have support for auto configuration:

[source,xml]
----
<dependency>
  <groupId>org.apache.camel.springboot</groupId>
  <artifactId>camel-jaxb-starter</artifactId>
  <version>x.x.x</version>
  <!-- use the same version as your Camel core version -->
</dependency>
----


The component supports 20 options, which are listed below.



[width="100%",cols="2,5,^1,2",options="header"]
|===
| Name | Description | Default | Type
| *camel.dataformat.jaxb.content-type-header* | Whether the data format should set the Content-Type header with the type from the data format. For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSON | true | Boolean
| *camel.dataformat.jaxb.context-path* | Package name where your JAXB classes are located. |  | String
| *camel.dataformat.jaxb.context-path-is-class-name* | This can be set to true to mark that the contextPath is referring to a classname and not a package name. | false | Boolean
| *camel.dataformat.jaxb.enabled* | Whether to enable auto configuration of the jaxb data format. This is enabled by default. |  | Boolean
| *camel.dataformat.jaxb.encoding* | To overrule and use a specific encoding |  | String
| *camel.dataformat.jaxb.filter-non-xml-chars* | To ignore non xml characheters and replace them with an empty space. | false | Boolean
| *camel.dataformat.jaxb.fragment* | To turn on marshalling XML fragment trees. By default JAXB looks for XmlRootElement annotation on given class to operate on whole XML tree. This is useful but not always - sometimes generated code does not have XmlRootElement annotation, sometimes you need unmarshall only part of tree. In that case you can use partial unmarshalling. To enable this behaviours you need set property partClass. Camel will pass this class to JAXB's unmarshaler. | false | Boolean
| *camel.dataformat.jaxb.ignore-j-a-x-b-element* | Whether to ignore JAXBElement elements - only needed to be set to false in very special use-cases. | false | Boolean
| *camel.dataformat.jaxb.jaxb-provider-properties* | Refers to a custom java.util.Map to lookup in the registry containing custom JAXB provider properties to be used with the JAXB marshaller. |  | String
| *camel.dataformat.jaxb.must-be-j-a-x-b-element* | Whether marhsalling must be java objects with JAXB annotations. And if not then it fails. This option can be set to false to relax that, such as when the data is already in XML format. | false | Boolean
| *camel.dataformat.jaxb.namespace-prefix-ref* | When marshalling using JAXB or SOAP then the JAXB implementation will automatic assign namespace prefixes, such as ns2, ns3, ns4 etc. To control this mapping, Camel allows you to refer to a map which contains the desired mapping. |  | String
| *camel.dataformat.jaxb.no-namespace-schema-location* | To define the location of the namespaceless schema |  | String
| *camel.dataformat.jaxb.object-factory* | Whether to allow using ObjectFactory classes to create the POJO classes during marshalling. This only applies to POJO classes that has not been annotated with JAXB and providing jaxb.index descriptor files. | false | Boolean
| *camel.dataformat.jaxb.part-class* | Name of class used for fragment parsing. See more details at the fragment option. |  | String
| *camel.dataformat.jaxb.part-namespace* | XML namespace to use for fragment parsing. See more details at the fragment option. |  | String
| *camel.dataformat.jaxb.pretty-print* | To enable pretty printing output nicely formatted. Is by default false. | false | Boolean
| *camel.dataformat.jaxb.schema* | To validate against an existing schema. Your can use the prefix classpath:, file: or http: to specify how the resource should by resolved. You can separate multiple schema files by using the ',' character. |  | String
| *camel.dataformat.jaxb.schema-location* | To define the location of the schema |  | String
| *camel.dataformat.jaxb.schema-severity-level* | Sets the schema severity level to use when validating against a schema. This level determines the minimum severity error that triggers JAXB to stop continue parsing. The default value of 0 (warning) means that any error (warning, error or fatal error) will trigger JAXB to stop. There are the following three levels: 0=warning, 1=error, 2=fatal error. | 0 | Integer
| *camel.dataformat.jaxb.xml-stream-writer-wrapper* | To use a custom xml stream writer. |  | String
|===
// spring-boot-auto-configure options: END
