diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc index 1a18d5450c1..d52e645b90e 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -1166,9 +1166,9 @@ work. To use the Jackson XML renderer, add the following dependency to your proj ---- -If Jackson's XML extension is not available, JAXB (provided by default in the JDK) is -used, with the additional requirement of having `MyThing` annotated as -`@XmlRootElement`, as shown in the following example: +If Jackson's XML extension is not available and JAXB is available, XML can be rendered +with the additional requirement of having `MyThing` annotated as `@XmlRootElement`, as +shown in the following example: [source,java,indent=0,subs="verbatim,quotes,attributes"] ---- @@ -1179,7 +1179,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"] +---- + + org.glassfish.jaxb + jaxb-runtime + +---- + +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).