@@ -1166,9 +1166,9 @@ work. To use the Jackson XML renderer, add the following dependency to your proj
1166
1166
</dependency>
1167
1167
----
1168
1168
1169
- If Jackson's XML extension is not available, JAXB (provided by default in the JDK) is
1170
- used, with the additional requirement of having `MyThing` annotated as
1171
- `@XmlRootElement`, as shown in the following example:
1169
+ If Jackson's XML extension is not available and JAXB is available, XML can be rendered
1170
+ with the additional requirement of having `MyThing` annotated as `@XmlRootElement`, as
1171
+ shown in the following example:
1172
1172
1173
1173
[source,java,indent=0,subs="verbatim,quotes,attributes"]
1174
1174
----
@@ -1179,7 +1179,18 @@ used, with the additional requirement of having `MyThing` annotated as
1179
1179
}
1180
1180
----
1181
1181
1182
- To get the server to render XML instead of JSON, you might have to send an
1182
+ JAXB is only available out of the box with Java 8. If you're using a more recent java
1183
+ generation, add the following dependency to your project:
1184
+
1185
+ [source,xml,indent=0,subs="verbatim,quotes,attributes"]
1186
+ ----
1187
+ <dependency>
1188
+ <groupId>org.glassfish.jaxb</groupId>
1189
+ <artifactId>jaxb-runtime</artifactId>
1190
+ </dependency>
1191
+ ----
1192
+
1193
+ NOTE: To get the server to render XML instead of JSON, you might have to send an
1183
1194
`Accept: text/xml` header (or use a browser).
1184
1195
1185
1196
0 commit comments