From 46dc04374425e86886f374f0af607d629c961aec Mon Sep 17 00:00:00 2001 From: buildmaster Date: Fri, 20 Mar 2020 19:06:42 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- reference/html/index.html | 52 ++++++++++++++++++++-- reference/html/spring-cloud-openfeign.html | 52 ++++++++++++++++++++-- 2 files changed, 96 insertions(+), 8 deletions(-) diff --git a/reference/html/index.html b/reference/html/index.html index f99f5f68..ed645010 100644 --- a/reference/html/index.html +++ b/reference/html/index.html @@ -109,9 +109,10 @@ $(addBlockSwitches);
  • 1.9. Feign logging
  • 1.10. Feign @QueryMap support
  • 1.11. HATEOAS support
  • -
  • 1.12. Troubleshooting +
  • 1.12. Spring @MatrixVariable Support
  • +
  • 1.13. Troubleshooting
  • @@ -849,9 +850,52 @@ public interface DemoTemplate {
    -

    1.12. Troubleshooting

    +

    1.12. Spring @MatrixVariable Support

    +
    +

    Spring Cloud OpenFeign provides support for the Spring @MatrixVariable annotation.

    +
    +
    +

    If a map is passed as the method argument, the @MatrixVariable path segment is created by joining key-value pairs from the map with a =.

    +
    +
    +

    If a different object is passed, either the name provided in the @MatrixVariable annotation (if defined) or the annotated variable name is +joined with the provided method argument using =.

    +
    +
    +
    +
    IMPORTANT
    +
    +

    Even though, on the server side, Spring does not require the users to name the path segment placeholder same as the matrix variable name, since it would be too ambiguous on the client side, Sprig Cloud OpenFeign requires that you add a path segment placeholder with a name matching either the name provided in the @MatrixVariable annotation (if defined) or the annotated variable name.

    +
    +
    +
    +
    +

    For example:

    +
    +
    +
    +
    @GetMapping("/objects/links/{matrixVars}")
    +Map<String, List<String>> getObjects(@MatrixVariable Map<String, List<String>> matrixVars);
    +
    +
    +
    +

    Note that both variable name and the path segment placeholder are called matrixVars.

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

    1.13. Troubleshooting

    -

    1.12.1. Early Initialization Errors

    +

    1.13.1. Early Initialization Errors

    Depending on how you are using your Feign clients you may see initialization errors when starting your application. To work around this problem you can use an ObjectProvider when autowiring your client.

    diff --git a/reference/html/spring-cloud-openfeign.html b/reference/html/spring-cloud-openfeign.html index f99f5f68..ed645010 100644 --- a/reference/html/spring-cloud-openfeign.html +++ b/reference/html/spring-cloud-openfeign.html @@ -109,9 +109,10 @@ $(addBlockSwitches);
  • 1.9. Feign logging
  • 1.10. Feign @QueryMap support
  • 1.11. HATEOAS support
  • -
  • 1.12. Troubleshooting +
  • 1.12. Spring @MatrixVariable Support
  • +
  • 1.13. Troubleshooting
  • @@ -849,9 +850,52 @@ public interface DemoTemplate {
    -

    1.12. Troubleshooting

    +

    1.12. Spring @MatrixVariable Support

    +
    +

    Spring Cloud OpenFeign provides support for the Spring @MatrixVariable annotation.

    +
    +
    +

    If a map is passed as the method argument, the @MatrixVariable path segment is created by joining key-value pairs from the map with a =.

    +
    +
    +

    If a different object is passed, either the name provided in the @MatrixVariable annotation (if defined) or the annotated variable name is +joined with the provided method argument using =.

    +
    +
    +
    +
    IMPORTANT
    +
    +

    Even though, on the server side, Spring does not require the users to name the path segment placeholder same as the matrix variable name, since it would be too ambiguous on the client side, Sprig Cloud OpenFeign requires that you add a path segment placeholder with a name matching either the name provided in the @MatrixVariable annotation (if defined) or the annotated variable name.

    +
    +
    +
    +
    +

    For example:

    +
    +
    +
    +
    @GetMapping("/objects/links/{matrixVars}")
    +Map<String, List<String>> getObjects(@MatrixVariable Map<String, List<String>> matrixVars);
    +
    +
    +
    +

    Note that both variable name and the path segment placeholder are called matrixVars.

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

    1.13. Troubleshooting

    -

    1.12.1. Early Initialization Errors

    +

    1.13.1. Early Initialization Errors

    Depending on how you are using your Feign clients you may see initialization errors when starting your application. To work around this problem you can use an ObjectProvider when autowiring your client.