Skip to content

Add support for placeholders to Feign spring-mvc annotations of headers field #290

Open
@ddf2008

Description

@ddf2008

Hi, I saw there is an issue spring-cloud/spring-cloud-netflix#894 which add support for placeholders of value field.
But other field such as "headers" still not support placeholder.
Since sometimes we need set Authentication header, it is awesome if the value could be loaded from properties file.

@FeignClient("foo")
public interface FooClient{
    @RequestMapping(value = "${my.special.placeholder}",
            method = RequestMethod.GET,
            headers = "${my.token}"
    ResponseEntity getSomeData(s);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions