From 93d533dfa69885471a49b1e13ffe703620d953a9 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 2 Feb 2015 16:52:17 +0000 Subject: [PATCH] Document auto-configuration support for Spring HATEOAS Closes gh-2426 --- .../src/main/asciidoc/spring-boot-features.adoc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 22baeef5fe..51aa947211 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -1150,6 +1150,22 @@ behaviour by setting `com.ibm.ws.webcontainer.invokeFlushAfterService` to `false +[[boot-features-spring-hateoas]] +==== Spring HATEOAS +If you're developing a RESTful API that makes use of hypermedia, Spring Boot provides +auto-configuration for Spring HATEOAS that works well with most applications. The +auto-configuration replaces the need to use `@EnableHypermediaSupport` and registers a +number of beans to ease building hypermedia-based applications including a +`LinkDiscoverer` and an `ObjectMapper` configured to correctly marshal responses into +the desired representation. The `ObjectMapper` will be customized based on the +`spring.jackson.*` properties or a `Jackson2ObjectMapperBuilder` bean if one exists. + +You can take control of Spring HATEOAS's configuration by using +`@EnableHypermediaSupport`. Note that this will disable the `ObjectMapper` customization +described above. + + + [[boot-features-jersey]] === JAX-RS and Jersey If you prefer the JAX-RS programming model for REST endpoints you can use one of the