Commit 5e441897 authored by Stephane Nicoll's avatar Stephane Nicoll

Merge branch '2.1.x'

parents 8c506e06 130ef102
...@@ -1167,9 +1167,9 @@ work. To use the Jackson XML renderer, add the following dependency to your proj ...@@ -1167,9 +1167,9 @@ work. To use the Jackson XML renderer, add the following dependency to your proj
</dependency> </dependency>
---- ----
If Jackson's XML extension is not available, JAXB (provided by default in the JDK) is If Jackson's XML extension is not available and JAXB is available, XML can be rendered
used, with the additional requirement of having `MyThing` annotated as with the additional requirement of having `MyThing` annotated as `@XmlRootElement`, as
`@XmlRootElement`, as shown in the following example: shown in the following example:
[source,java,indent=0,subs="verbatim,quotes,attributes"] [source,java,indent=0,subs="verbatim,quotes,attributes"]
---- ----
...@@ -1180,7 +1180,18 @@ used, with the additional requirement of having `MyThing` annotated as ...@@ -1180,7 +1180,18 @@ used, with the additional requirement of having `MyThing` annotated as
} }
---- ----
To get the server to render XML instead of JSON, you might have to send an JAXB is only available out of the box with Java 8. If you're using a more recent java
generation, add the following dependency to your project:
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
----
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
----
NOTE: To get the server to render XML instead of JSON, you might have to send an
`Accept: text/xml` header (or use a browser). `Accept: text/xml` header (or use a browser).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment