From 3b2242a27386b6832d37f4e0fbcb9c4d4a44562a Mon Sep 17 00:00:00 2001 From: Olga Maciaszek-Sharma Date: Thu, 16 May 2024 15:02:00 +0200 Subject: [PATCH] Fix docs. Reformat. --- docs/modules/ROOT/pages/spring-cloud-openfeign.adoc | 9 +++++---- ...FeignClientBeanFactoryInitializationAotProcessor.java | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/modules/ROOT/pages/spring-cloud-openfeign.adoc b/docs/modules/ROOT/pages/spring-cloud-openfeign.adoc index b3fc7fe8d..097c30494 100644 --- a/docs/modules/ROOT/pages/spring-cloud-openfeign.adoc +++ b/docs/modules/ROOT/pages/spring-cloud-openfeign.adoc @@ -45,7 +45,8 @@ public interface StoreClient { @GetMapping("/stores") Page getStores(Pageable pageable); - @PostMapping(value = "/stores/{storeId}", consumes = "application/json", params = "mode=upsert") + @PostMapping(value = "/stores/{storeId}", consumes = "application/json", + params = "mode=upsert") Store update(@PathVariable("storeId") Long storeId, Store store); @DeleteMapping("/stores/{storeId:\\d+}") @@ -723,11 +724,11 @@ public interface DemoTemplate { } ---- -In the above example, the request url is resolved to `/stores/{storeId}?mode=upsert`. + +In the above example, the request url is resolved to `/stores/storeId?mode=upsert`. + The params attribute also supports the use of multiple `key=value` or only one `key`: + -- When `params = { "key1=v1", "key2=v2" }`, the request url is parsed as `/stores/{storeId}?key1=v1&key2=v2`. -- When `params = "key"`, the request url is parsed as `/stores/{storeId}?key`. +- When `params = { "key1=v1", "key2=v2" }`, the request url is parsed as `/stores/storeId?key1=v1&key2=v2`. +- When `params = "key"`, the request url is parsed as `/stores/storeId?key`. diff --git a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/aot/FeignClientBeanFactoryInitializationAotProcessor.java b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/aot/FeignClientBeanFactoryInitializationAotProcessor.java index 36ac65b5a..3a7c73482 100644 --- a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/aot/FeignClientBeanFactoryInitializationAotProcessor.java +++ b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/aot/FeignClientBeanFactoryInitializationAotProcessor.java @@ -111,7 +111,8 @@ private void registerMethodHints(ReflectionHints hints, Class clazz) { introspectPublicMethodsOnAllInterfaces(hints, clazz); } - // TODO: switch to reflectionHints.registerForInterfaces(...) after upgrading to Framework 6.2.0 + // TODO: switch to reflectionHints.registerForInterfaces(...) after upgrading to + // Framework 6.2.0 // from Spring Framework BeanRegistrationsAotContribution private void introspectPublicMethodsOnAllInterfaces(ReflectionHints hints, Class clazz) { Class currentClass = clazz;