From 0f189caaca2e5cc4f87b1a8d280794be8e468e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=AD=8F=2C=E5=B0=8F=E9=AD=8F=2C=E6=88=91?= =?UTF-8?q?=E4=BB=AC=E8=A6=81=E5=8E=BB=E5=93=AA=E9=87=8C=E5=91=80?= Date: Fri, 26 Jan 2024 17:27:25 +0800 Subject: [PATCH] interface-annotations-doc --- .../ROOT/pages/spring-cloud-openfeign.adoc | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/modules/ROOT/pages/spring-cloud-openfeign.adoc b/docs/modules/ROOT/pages/spring-cloud-openfeign.adoc index 2bbb4009c..c8c76c70f 100644 --- a/docs/modules/ROOT/pages/spring-cloud-openfeign.adoc +++ b/docs/modules/ROOT/pages/spring-cloud-openfeign.adoc @@ -949,6 +949,36 @@ TIP: If you want to run Spring Cloud OpenFeign clients in AOT or native image mo TIP: However, if you set the `url` value via properties, it is possible to override the `@FeignClient` `url` value by running the image with `-Dspring.cloud.openfeign.client.config.[clientId].url=[url]` flag. In order to enable overriding, a `url` value also has to be set via properties and not `@FeignClient` attribute during buildtime. +[[interface-annotations]] +== Interface Annotations + +For those who are familiar with Spring Web annotations, the following table describes the main differences between the Spring annotations and their Feign counterparts: + +|=== +|HTTP Protocol |Spring Web |Feign + +|Request line +|`@RequestMapping` ... +|`@RequestLine` + +|Path +|`@PathVariable`, `@MatrixVariable` +|`@Param` + +|Query +|`@SpringQueryMap`,`@RequestParam` +|`@QueryMap`, `@Param` + +|Request Headers +|`@RequestHeader` +|`@Headers`, `@HeaderMap` + +|Request Body +|`@RequestBody` +|`@Body` + +|=== + [[configuration-properties]] == Configuration properties