From c250530766f2c110e8a559877400513708f46060 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Fri, 28 Jun 2019 14:38:49 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- spring-cloud-openfeign.html | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/spring-cloud-openfeign.html b/spring-cloud-openfeign.html index 56c13287..4d142a61 100644 --- a/spring-cloud-openfeign.html +++ b/spring-cloud-openfeign.html @@ -101,6 +101,7 @@ $(addBlockSwitches);
  • Feign request/response compression
  • Feign logging
  • Feign @QueryMap support
  • +
  • HATEOAS support
  • @@ -786,7 +787,7 @@ public class Params {
    @FeignClient("demo")
    -public class DemoTemplate {
    +public interface DemoTemplate {
     
         @GetMapping(path = "/demo")
         String demoEndpoint(@SpringQueryMap Params params);
    @@ -797,6 +798,30 @@ public class DemoTemplate {
     

    If you need more control over the generated query parameter map, you can implement a custom QueryMapEncoder bean.

    +
    +

    HATEOAS support

    +
    +

    Spring provides some APIs to create REST representations that follow the HATEOAS principle, Spring Hateoas and Spring Data REST.

    +
    +
    +

    If your project use the org.springframework.boot:spring-boot-starter-hateoas starter +or the org.springframework.boot:spring-boot-starter-data-rest starter, Feign HATEOAS support is enabled by default.

    +
    +
    +

    When HATEOAS support is enabled, Feign clients are allowed to serialize +and deserialize HATEOAS representation models: EntityModel, CollectionModel and PagedModel.

    +
    +
    +
    +
    @FeignClient("demo")
    +public interface DemoTemplate {
    +
    +    @GetMapping(path = "/stores")
    +    CollectionModel<Store> getStores();
    +}
    +
    +
    +