Add support for placeholders in @FeignClient definitions

Includes name and url attributes.

fixes gh-414
This commit is contained in:
Oreste Luci
2015-11-19 13:23:30 +01:00
committed by Spencer Gibb
parent 4721bee8f2
commit 94d4bdfcc3
6 changed files with 77 additions and 3 deletions

View File

@@ -790,6 +790,16 @@ NOTE: The `serviceId` attribute is now deprecated in favor of the `name` attribu
WARNING: Previously, using the `url` attribute, did not require the `name` attribute. Using `name` is now required.
Placeholders are supported in the `name` and `url` attributes.
[source,java,indent=0]
----
@FeignClient(name = "${feign.name}", url = "${feign.url}")
public interface StoreClient {
//..
}
----
Spring Cloud Netflix provides the following beans by default for feign (`BeanType` beanName: `ClassName`):
* `Decoder` feignDecoder: `ResponseEntityDecoder` (which wraps a `SpringDecoder`)