diff --git a/2.2.x/reference/html/index.html b/2.2.x/reference/html/index.html index ea16af93..e4f9f1a2 100644 --- a/2.2.x/reference/html/index.html +++ b/2.2.x/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
  • @@ -876,9 +877,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/2.2.x/reference/html/spring-cloud-openfeign.html b/2.2.x/reference/html/spring-cloud-openfeign.html index ea16af93..e4f9f1a2 100644 --- a/2.2.x/reference/html/spring-cloud-openfeign.html +++ b/2.2.x/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
  • @@ -876,9 +877,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.