spring-cloud / spring-cloud/spring-cloud-openfeign

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

Open
#290 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
Java
Stars
1.3k
Forks
838
Avg merge
2d 11h
Merged PRs (30d)
13

Description

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);
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how Feign spring-mvc annotations currently resolve placeholders for the value field, then compare that path with handling of the headers field. Confirm the expected syntax from the issue example and verify that header placeholders load from application properties without breaking existing header behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.